The web.config
file (C:\Program Files (x86)\UiPath\Orchestrator
) contains multiple settings that enable you to configure Orchestrator to your liking. Most of the parameters that interest you can be found under appSettings
, but there might be some logging configurations that can be changed after install.
Note:
It is recommended that only administrators change the values of these parameters.
Additionally, it is recommended that you stop the IIS site in order to modifyweb.config
settings under any circumstances.
Logging is divided as follows:
1. Robot: <logger name="Robot.*" writeTo="database,robotElasticBuffer" final="true" />
- The Robot logger, with the following parameters:
writeTo
- The location where log messages generated by the Robot are written. By default, they are sent both to the Orchestrator's SQL database (database
) and ElasticSearch (robotElasticBuffer
), thus enabling you to have non-repudiation logs. Delete one of the values to stop logging to that location.final
- A flag that indicates what to do when a match between a logged message and the logger name is found. When set totrue
, it does not look for another match. When set tofalse
, other rules matching the same source are checked. By default, it is set totrue
.
2. Schedules: <logger name="Quartz.*" minlevel="Info" writeTo="eventLogQuartz" final="true" />
- Used to log messages generated by schedules.
Note:
To ensure a smooth run for schedules in an Orchestrator setup with a load balancer you should also set the
quartz.jobStore.clustered
parameter totrue
.
3. All others: <logger name="*" minlevel="Info" writeTo="eventLog" />
- Used to log all other messages besides the ones described above, including those generated by Orchestrator.
Other preferences to set up for ElasticSearch:
<target xsi:type="ElasticSearch" name="robotElastic" uri="<elasticSearch_url>" index="${event-properties:item=indexName}-${date:format=yyyy.MM}" documentType="logEvent" includeAllProperties="true" layout="${message}" excludedProperties="agentSessionId,tenantId,organizationUnitId,indexName" />
Configure:
uri
- the ElasticSearch URL; note that you have to include the protocol and port, such ashttp://elastic_server:9200
.excludedProperties
- data that you do not want to be saved to ElasticSearch.
Note:
If you maintain more than two million logs in the SQL database, you might have some performance issues. For more than that, we recommend using Elasticsearch.
Enabling NLog Debugging
NLog is an open-source, easily configured, and extensible logging platform for a variety of .NET platforms. With NLog, you can store or pass log data to any number of predefined or custom targets, such as a local file, an event log, email, or database.
Though there exists some overlap, NLog and Orchestrator have several differentiating logging levels. For NLog you can select either Trace
, Debug
, Info
, Warn
, Error
, Fatal
, or Off
. See Logging Levels for a description of the available levels in Orchestrator.
You can enable debugging in NLog to ensure that it is functioning properly. By default NLog is set to Off
, it is enabled by configuring the following section of the web.config
file:
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" throwExceptions="false" internalLogLevel="Off" internalLogFile="">
The attributes which must be set are:
internalLogLevel
- the desired logging levelinternalLogFile
- the location of the log file
For example:
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" throwExceptions="false" internalLogLevel="Debug" internalLogFile="C:\logs.txt">
Note:
The user profile under which Orchestrator is running must have access to the path specified in the
internalLogFile
attribute.
Updated 3 years ago
See Also
App Settings |