Skip to main content
Version: 10.2.8

Manage logs

Customize RPA logrotate

The section describes how to tweak the log rotation on RPA Server. This feature is needed to free disk space and improve security.

  1. Go to ${rpa_installation_folder}/rpa-grid (by default, C:/RPA/rpa-grid).

  2. Change the following values in logback-hub.xml and in all needed logback-nodeX.xml files:

    • To change the max size of RPA log, add the <maxFileSize> tag inside the <timeBasedFileNamingAndTriggeringPolicy> tag, and set the value of this tag (1024KB, 100MB, 1GB, and so on):

      <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
      <maxFileSize>100MB</maxFileSize>
      </timeBasedFileNamingAndTriggeringPolicy>
    • To change the max days of the log history, add the <maxHistory> tag inside the <rollingPolicy> tag, and set the value of this tag as a number (10, 30, 60, and so on):

      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <maxHistory>30</maxHistory>
      </rollingPolicy>
Expand to see a combined example
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR}/${LOG_FILE_NAME}-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 100MB -->
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!-- keep 30 days worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<charset>UTF-8</charset>
<pattern>%date{ISO8601} %-5level [%thread] %class.%M[:%L] - %msg%n</pattern>
</encoder>
</appender>

Customize RPA log location

RPA Nginx

  1. Open nginx.conf located in the <RPA_ROOT>/nginx/conf directory and add the following lines before the server section:

    access_log d:/RPA/nginx/access.log;
    error_log d:/RPA/nginx/error.log;

    server {
    ...
  2. Make sure the target directory exists before restarting Nginx.

tip

If rotation scripts are used, update the rotate_nginx_logs.bat script.

RPA grid

Open logback-*.xml located in the <RPA_ROOT>/rpa-grid directory and edit the LOG_DIR property:

<property name="LOG_DIR" value="d:/RPA/logs-grid"/>

Required files are as follows:

  • logback-hub.xml
  • logback-node0.xml
  • logback-node1.xml

Optional files, depending on the number of configured RPA nodes, are as follows:

  • logback-nodeX.xml