Log Source

Hi,

When run the process in debug mode it shows a log “Debug started for file: X”
And when run the process in run mode it shows “Execution started for project: X”

Where is the source for this logs , could any one help me on this

Thank you

To see the logs easily, inside the uipath studio, execute Ctrl+L!

Thank you , but I need a way to print the first log written in the output. Which will be one of the logs I mentioned above

Hi @malak_s

The source of UiPath execution logs for community edition can be found at C:\Users\%USERNAME%\AppData\Local\UiPath\Logs

In this file you will NOT find “Trace” level logs because that depends on your Nlog.config which can be found at "C:\Users\%USERNAME%\AppData\Local\UiPath\app-20.10.3" your version might be different.

This Nlog config file defines where and how your execution logs will be stored. The default content in community edition looks like this :

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <variable name="WorkflowLoggingDirectory" value="${specialfolder:folder=LocalApplicationData}/UiPath/Logs" />
  <rules>
    <logger name="WorkflowLogging" writeTo="WorkflowLogFiles" final="true" />
    <logger minLevel="Info" writeTo="EventLog" />
  </rules>
  <targets>
    <target type="File" name="WorkflowLogFiles" fileName="${WorkflowLoggingDirectory}/${shortdate}_Execution.log" layout="${time} ${level} ${message}" keepFileOpen="true" openFileCacheTimeout="5" concurrentWrites="true" encoding="utf-8" writeBom="true" />
    <target type="EventLog" name="EventLog" layout="${processname} ${assembly-version} ${newline}${message}" source="UiPath" log="Application" />
  </targets>
</nlog>

UiPath has defined a logging format here that save files with shortdate_Execution.log and does it on a date basis (1 execution log file everyday). You can take a look at NLog documentation if you want to change some aspects or want to log to another file of your liking. File target · NLog/NLog Wiki · GitHub
UiPath execution wont be affected by NLog config but if your target file path does not exists then you might miss the logs.

Both Trace and Info logs:
If you want to have the “Debug started for file: X” (this is a trace log in UiPath) in addition to “Execution started for project: X” (this is an info log in UiPath) as well, all you have to change in your NLog.config is set

<logger minLevel="Trace" writeTo="EventLog" />

Or

In your UiPath assistant you can go to preferences and change the Logging Level to Trace. This is a GUI used by UiPath to change the robot NLog config. Note: it means that only this particular Robot has a modified Nlog config and not all the robots connected to your orchestrator. If you ever want to change it in all robots connected to the orchestrator you have to modify the web.config file of your orchestrator (only accessible in enterprise version).

In the enterprise version of UiPath the location of the Logs will be based on where you installed them and all such NLog settings can be set on your enterprise orchestrator web.config file. You can also change the logging in the robot if you want two different types of logs in Robot and in Orchestrator.

Hope this clears up some doubts.