Subscribe

UiPath Insights

The UiPath Insights Guide

Configuring Log Rules

Overview


Robot logs capture diagnostic and execution logs. You can configure the conditions for which Robot logs are ingested by Insights. For example, you only want to capture logs for Processes that include a specific name.

For more information, see Robot logs.

When to configure log rules


Default log rules


The default settings for Robot logs ingested by Insights include Ingest only last logs and error logs. The following sections show default log rules based on the Insights version that you are running.

Default log rules for version 2022.4

In this example, the last logs and Error logs for all processes are ingested. This version of Insights ingests the last Info level from a Robot that has executed a process, alongside process and any Error level logs, as shown in the following example.

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
  <filters defaultAction="Ignore">
    <when condition="level >= LogLevel.Error or ends-with('${message}',' execution ended')" action="Log" />
  </filters>
</logger>

Default log rules for version 2021.10

In this example, all logs (Info level and above) for all processes are ingested. This version of Insights ingests all logs (Info level and a) generated by the Robot for all processes, as shown in the following example.

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs"/>

Configure log rules


📘

Before you begin

  • Only administrators should change the values in the Orchestrator configuration file.

  • Back up the UiPath.Orchestrator.dll.config file before proceeding. You can find the file in C:\Program Files (x86)\UiPath\Orchestrator.

  • Restart the website after making changes to Orchestrator configuration file.

  • All parameters are case sensitive.

  • For best performance, Robot Logs generated over a two-year timeframe shouldn't exceed 200 million records.

  • Use the NLog configuration file to capture data that is relevant for Insights in your environment and reduce the number of records generated by Robot Logs.

  1. Navigate to C:\Program Files (x86)\UiPath\Orchestrator and open the UiPath.Orchestrator.dll.config file to modify Orchestrator settings.
  2. Find the Robot Logs parameters (e.g., <logger name="Robot.*" environmentSpecificConfiguration/>)
  3. Configure a filter with a default action (e.g., filters defaultAction="Ignore").
  4. Configure conditions based on the log level or other events (see Log rules example).
  5. Save the file and restart Orchestrator.

For more information on configuring the Orchestrator configuration file, see UiPath.Orchestrator.dll.config.

Log rules examples


The following examples show custom log rule configurations for Info and Error level logs. By setting specific conditions, Insights ingests logs only for the processes that you configure.

Ingest all logs and any Error logs for a particular process

In the following example, Insights ingests all Info level and Error logs for the following process names: payment disp, 68fields, or 68fields_20.

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Ignore">
      <when condition="equals('${event-properties:item=processName}', 'payment disp') or equals('${event-properties:item=processName}', '68fields') or equals('${event-properties:item=processName}', '68fields_20')" action="Log" />
    </filters>
  </logger>

Ingest only last and Error logs for a particular process

In the following example, Insights ingests only last Info level logs and Error logs for the following process names: payment disp, 68fields, or 68fields_20.

Only Error level logs and the last log of each Robot are logged in to Insights.

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Ignore">
      <when condition="(level >= LogLevel.Error or ends-with('${message}',' execution ended')) and (contains('${event-properties:item=processName}', 'payment disp') or equals('${event-properties:item=processName}', '68fields') or equals('${event-properties:item=processName}', '68fields_20'))" action="Log" />
    </filters>
  </logger>

Do not ingest logs for a particular process


In the following example, Insights does not ingest any logs for the process name: payment disp.

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Log">
      <when condition="equals('${event-properties:item=processName}', 'payment disp')" action="Ignore" />
    </filters>
  </logger>

Related articles


NLog configuration file

Updated 2 months ago


Configuring Log Rules


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.