Log Message function

Dear Community,

May i know in what circumstances that normally you will include the log message below?

1 Like

Hi @SH_94

Logging is important for three reasons

  1. Logs writes the specified diagnostic message at the specified level.
    Say for example you are using excel activities to read a excel file and you are keeping a log message activity right after the excel activities mentioning as “EXCEL FILE IS READ SUCCESSFULLY”
    now when bot is executed and if you want to validate whether excel file is read successfully or not, you can check the output panel or the execution log files whether the LOG MESSAGE ACTIVITY executed successfully
    because if that log message activity is executed it obviously mean excel activity is performed successfully and only then logging has happened

so log message activity can be used as diagnostic message

  1. Log has different levels in it
    Trace, Info, Warn, Error and Fatal

so you can keep the level we want and it can be traced accordingly especially when we are debugging the process

  1. Log message activity is only one which will get displayed in OUTPUT panel and also will get saved in EXECUTION LOG FILES and in ORCHESTRATOR Logs if ran from orchestrator
    because you may wonder we can use WRITELINE activity to display the diagnostic messages. But the thing is it can be seen only in OUTPUT panel and not in any of the execution log files

For more details pls refer

Cheers @SH_94

2 Likes

Dear @Palaniyappan ,

Thanks a lot for the clear explanation.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.