UiPath Orchestrator Guide

Orchestrator Logs

Orchestrator Diagnostic Logs

These are diagnostic logs generated by UiPath Orchestrator regarding its behavior.

Enabling UiPath Orchestrator Diagnostic Logs

The UiPath Orchestrator Diagnostic Logs are enabled once UiPath Orchestrator is successfully installed. They rely on the NLog infrastructure and their configuration can be found in the Web.config file, under the <nlog> tag.

Targets of the UiPath Orchestrator Diagnostic Logs

All application logs are logged to the Event Viewer at the minimum logging level of Information. This is specified by the following lines in the Web.config file:

<target xsi:type="EventLog" name="eventLog" layout="${message}" source="Orchestrator" log="Application" />

<logger name="*" minlevel="Info" writeTo="eventLog" />

Logs generated by the Jobs Scheduler have a separate target and logger:

<target xsi:type="EventLog" name="eventLogQuartz" layout="[Quartz] ${message} ${onexception: ${exception:format=tostring}}" source="Orchestrator" log="Application" />

<logger name="Orchestrator.Quartz.*" minlevel="Info" writeTo="eventLogQuartz" />

Orchestrator Execution Logs

The Orchestrator Execution Logs are sent by the Robots connected to it and are displayed in the Logs section of the Jobs or Robots pages. The application receives the data from the Robots, adds its own parameters (TenantID, OrganizationUnitID), and forwards the messages to different targets, as specified in the <nlog> section from the Web.config file.

Targets of the Orchestrator Execution Logs

By default, all Robot logs are sent to the Logs table of the Default Orchestrator Database, where UiPath Orchestrator stores other information, but the Web.config file can be configured to send them to a different Database as well.

The Logs page displays information from the Logs table of the Default Database. So, if this section does not exist, or the logs are saved to a different database, the page is empty. All parameters should be according to the table schema, which looks like this:

<target xsi:type="Database" name="database" connectionStringName="Default" keepConnection="true">
 <commandText>
  insert into dbo.Logs (OrganizationUnitId, TenantId, TimeStamp, Level, WindowsIdentity, ProcessName, JobKey, Message, RawMessage)
  values (@organizationUnitId, @tenantId, @timeStamp, @level, @windowsIdentity, @processName, @jobId, @message, @rawMessage)
 </commandText>
  <parameter name="@organizationUnitId" layout="${event-properties:item=organizationUnitId}" />
  <parameter name="@tenantId" layout="${event-properties:item=tenantId}" />
  <parameter name="@timeStamp" layout="${date}" />
  <parameter name="@level" layout="${event-properties:item=levelOrdinal}" />
  <parameter name="@windowsIdentity" layout="${event-properties:item=windowsIdentity}" />
  <parameter name="@processName" layout="${event-properties:item=processName}" />
  <parameter name="@jobId" layout="${event-properties:item=jobId}" />
  <parameter name="@message" layout="${message}" />
  <parameter name="@rawMessage" layout="${event-properties:item=rawMessage}" />
</target>
 <logger name="Robot.*" writeTo="database" final="true" />

Other targets can be added to the logs by configuring the Web.config file. A list of available targets can be found here.

Elasticsearch Server

By default, there’s an Elasticsearch target configured from the installation script. The index is different for each tenant, but this can be configured from the specified target in the <nlog> section:

<target name="robotElasticBuffer" xsi:type="BufferingWrapper" flushTimeout="5000">
<target xsi:type="ElasticSearch" name="robotElastic" uri="uritoelasticsearchnode" index="${event-properties:item=indexName}-${date:format=yyyy.MM}" documentType="logEvent" includeAllProperties="true" layout="${message}" excludedProperties="agentSessionId,tenantId,organizationId,indexName" />
</target>
</target>

X-PACK Authentication

Orchestrator supports X-PACK authentication for Elasticsearch. To enable this, you must add the requireAuth="true" username="XPACKuser" password="p@$$w0rd" line in the following section of the web.config file:

<target name="serverElasticBuffer" xsi:type="BufferingWrapper" flushTimeout="5000">
<target xsi:type="ElasticSearch" name="serverElastic" uri="" index="serverdiagnostics-${date:format=yyyy.MM}" documentType="logEvent" includeAllProperties="true" layout="${machinename} ${message}" />
</target>

The section should look like this:

<target name="serverElasticBuffer" xsi:type="BufferingWrapper" flushTimeout="5000">
<target xsi:type="ElasticSearch" name="serverElastic" requireAuth="true" username="XPACKuser" password="p@$$w0rd" uri="" index="serverdiagnostics-${date:format=yyyy.MM}" documentType="logEvent" includeAllProperties="true" layout="${machinename} ${message}" />
</target>

Orchestrator Logs