How to customize the name of log file which is generated when using log message activity

Hi everyone,

How I can customize the name of log file which is generated when using log message activity.
I want to something like this: yyyyMMdd HH.

Please help me.

Many thanks,
Hoang Anh.

Hi,

Have a look on this activity.

https://activities.uipath.com/docs/debug-add-log-fields

You could add a log field with a specific name, if you want this specific format, i do it with the datatype string and passing value Now.toString(“yyyyMMdd HH”), Datetime will have different formating.

Cheers

Hi @Florent_Salendres,

I mean i want to change the name of log file at folder: C:\Users\PC\AppData\Local\UiPath\Logs.
currently its name is something like this; 2017-11-13_Execution.log
and i want to change it to: yyyyMMdd_HH.log.

Thanks
Hoang Anh.

Oops,

One UIPath instalation you have Nlog.config file.

In there you should be able to modify the fileName pattern and its location if you want.

you have here explaination on how you can customize it

I think you need to modfiy “Excecution file one”

Cheers

Hi @Florent_Salendres,

I found the Nlog.Config file at: C:\Program Files (x86)\UiPath Platform.
And the file name of log file has format as follow: ${LogDirectory}/${shortdate}_Execution.log"
Could you show me how to change this value to: yyyyMMdd HH.log

Many thanks,
Hoang Anh.

Hi @anhth15,

Try to use: fileName=“${LogDirectory}/${date:format=yyyyMMdd HH}.log”

image

Regards,
Susana

2 Likes

Thank @Susana,
It worked for my case.