Archiving Execution Logs Automatically After Particular Size

Is there a way by which the size of execution logs can be controlled ( archiving the old log and create new log file) ?

  1. Add "archiveAboveSize" tag in Nlog.config file found at the below location
    "C:\Program Files (x86)\UiPath\Studio\NLog.config"

2. Below is the syntax

<target xsi:type="File" name="executionFile" fileName="${LogDirectory}/${shortdate}_Execution.log" layout="${time} ${level} ${message}" concurrentWrites="true" archiveAboveSize ="1048576"/>

3. Configure the Size in bytes, so in this case, it will automatically archive the log file which exceeds 1048576 bytes(1 MB), please refer the below screenshot

For Versions 19.4 and above, the target name for the execution logs has changed from "executionFile" to "WorkflowLogFiles"