Robot Nlog Configuration Change

Problem with Robot logs filling the available disk.

Issue Description: The logs are found in :C:\Users\uirobot1\AppData\Local\UiPath\Log .
Note: The database (log) is not deleted after the logs have been successfully sent to Orchestrator.


Resolution:

  • The below setting can be made in NLOG.config file that is present in Studio installation folder i.e. C:\programefiles\uipath\studio
  • Implement a new rule in the nlog.config to keep the file for a specific amount of days. To achieve this, add in the Nlog.Config -> targets additional parameters ( maxArchiveFiles="5" archiveEvery="Day") as in the below example or create rule according to Nlog documentation Archive Old Log Files .


Minimum Requirement On 21.4, Robot uses "NLog" Version="4.7.6"

Note: As each UiPath log file that is saved on disk corresponds to a certain date: when the date changes, a new log file is created eg : 2021-05-13_Execution.log, 2021-05-14_Execution.log;

Use maxArchiveFiles instead of maxArchiveDays. Be cautious of maxArchiveFiles = maxArchiveDays * types of files ( have executions logs, Studio logs etc.).