How to get full path of log file generated when robot run

activities

#1

Hi everyone,
How can I get the full path of log file generated when robot run. I need that path to do some stuff in my workflow.
Please help me.

Many thanks,
Hoang Anh.


#2

C:\Users\<SystemUserID>\AppData\Local\UiPath\Logs generally this is the default location unless you change while installation.


#3

Hi,
Hit Ctrl + L


#4

Hi @rkelchuri, @ddpadil,

Thank you so much for your quick reply.
But It doesn’t work in my case because my customer wants to change the location of log file in NLog.config file. So I need to get that path dynamically in my workflow.
How can I achieve it.

Many thanks,
Hoang Anh.


#5

Hi,
Did you manage to change the Nlog.config file path?


#6

I think @anhth15 is wanted to change the default path of log file location in NLog.config file


#7

Hi,

I change the location of log file in NLog.config at value:
name=“LogDirectory” value="${specialfolder:folder=LocalApplicationData}/UiPath/Logs"
And I want to get this value in my workflow dynamically.

many thanks,
Hoang anh.


#8

Hi,

If there is no solution to achieve that, How can I set the value value="${specialfolder:folder=LocalApplicationData}/UiPath/Logs"
to a desired location in my workflow dynamically.

Many thanks,
Hoang Anh.


#9

If you change this entry

in NLog.config file then NLog.dll will pick the log folder location to create from config file.
Give a try… :smile:


#10

Hi
Check this out:

<target name="logfile" xsi:type="File"
    fileName="${specialfolder:folder=ApplicationData}/LogFile.txt"/>

Refer
regards to Nlog


#11

Hi @rkelchuri, @ddpadil,

Could you show me the solution in more detail.

Many thanks,
Hoang Anh.