How to enable logs for each activity in studio?

How to enable logs for each activity in studio?
I want to see log of each step so i can trace back where it failed. Currently it only shows custom info logs and exception and not the activity name.

@tejaskumar.darji

In the Debug panel of studio, there we have Log activities option,

Click on it enable logs and then run the project.

PFB screen shot for reference

2 Likes

Hello @tejaskumar.darji,

Use ‘Log Message’ activity before/after important activities to track flow.

@tejaskumar.darji,

For better debugging I would suggest to enable Execution Trail and Verbose level logging with Log Activities from the Debug menu.

@

For each activity level log you might need to use studio nlog files or robot nlog files on the system .practically logging all those to orchetarator will increase the data exponentially..

Cheers

1 Like

For debug this makes sense, Log Activities button in studio is helping. How can we have the same feature in unattended run, so each activity entry is captured.

@tejaskumar.darji,

You were initially asking for Studio. If you want similar settings for unattended or runtime, make sure you enable trace level logging on your robot.

Hi Tejas,
You can get the exception details in log message in your catch block or Global execption handler.

To get the details as you wish, please refer below link

Hope it helps :crossed_fingers:

Hi @tejaskumar.darji

Usually, following below approach would help ease the troubleshooting. I would not suggest going for logs for each and every activity as over a period of time, this will increase exponentially and consume a lot of space.

Combining below points would help with quicker troubleshooting..

  1. having log messages at certain key points like a) using the output of one activity as an input for another b) fetching some values c) adding items to queue so printing the count etc d) for workflows having the starting workflow message and then ending workflow message etc

  2. having proper meaningful names for activities/sequences etc

  3. proper exception handling, surround the workflow or a troublesome activity with try-catch.. proper log messages within catch once exception is raised and caught

  4. take screenshot upon every system exception and save it so you would know exactly which screen bot was on when exception occurred

Now, if an error happened,and you are not able to understand clearly from logs which step did it happen on, you can fetch last printed log message, go to your code, ctrl+f to find that log message and trace the steps from there along with screenshots that were taken.

This approach helps us good enough, we never felt the need for enabling logs for each and every activity.

But still, if there are certain scenarios where you would want detailed logs, enable it only need basis rather than all.

Hope this helps.

Regards
Sonali

1 Like