Save throw messages in a separate log file

Hi Everyone,

I want all my log messages and exception thrown messages in a separate log file or notepad. Could you please let me know how can be achieved that? Like how uipath saves log file

Thanks,
Ulaga

You can use ‘Append Line’ activity to keep on appending logs to the same notepad. But you have to manually configure each of the log messages that you may want.

Thanks,
Rammohan B.

1 Like

Thank you. It works and I want to collect the Execution end message also in the log and how to achieve that. For example if one stopped the bot then it would display execution ended in [Time] How to capture that also in the log message.

Use try/catch and in Finally block use Append Line and write “Execution Ended”+ DateTime.Now.ToString if you are using a separate log file

1 Like

@Boopathi

Use should stop activity in your flow and include the execution ended and time logs after that.

1 Like

Thank you. Should stop works only in orchestrator. I am using the bot without orchestrator in a desktop.

@Rammohan91 Hi Ram,

Thank you. Bot saves the log file in notepad now but want to generate log file for each single day. Could you please let me know how can that be done?

Thanks,
Ulaga

Just append current date on the filename of the notepad.

Something like this,
DateTime.Today.Date.ToString(“MM-dd-yyyy”)

Thanks,
Rammohan B.

Thank you. I will check and revert.