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

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.

1 Like

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

1 Like

Hi,
Hit Ctrl + L

3 Likes

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.

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

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

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.

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.

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:

Hi
Check this out:

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

Refer
regards to Nlog

Hi @rkelchuri, @ddpadil,

Could you show me the solution in more detail.

Many thanks,
Hoang Anh.

did you manage to get the solution to this? I want to dynamically access theworkflowlogging directory from nlog.config