UiPath or workflow file variables - log fields

Does any UiPath running environment variables exist like the Workflow ID’s that are visible in the log-messages or Workflow filename, version number etc? I think that I would like to use these sometimes for logging purposes or something but could not find any info about these.

Hi @Jyrki_Heinonen,

I suppose that you are talking about when an exception occurs at a specific workflow and then you need to log the Workflow name where the error has occured. If it’s the case, I would suggest you to do the following steps:

  1. Surround your entire workflow with Try Catch (Ctrl + T)

  2. Inside the Catch you can display the exception source by displaying the property like this: exception.Source

That’s why is a good practice to rename your main activities, because it’s here that they are going be used.

You actually have that in Logs and you can add more using Add Log Fields

18:11:26.2037 Info { "message":"3", "level":"Information", "timeStamp":"2017-07 06T18:11:26.2037733+03:00", "windowsIdentity":"MIHAIBADITA5467\\badita", "processName":"UiDemo", "processVersion":"2017.1.6383.32108", "fileName":"debug", "jobId":"71fe6960-6f17-426b-bc23-6c8293475b67", "robotName":"MBRobo" }

Can i get these variables in Log Message