Edit the Storage Connector log settings (optional)

Log settings can be customized including the log level, retention of log files and the name of the log file (to improve the usability of reviewing logs from multiple systems).

Customizing the name of the log file

  1. Edit /etc/syncp-storage/logger.xml
    sudo vi etc/syncp-storage/logger.xml
  2. Modify the <appender> <rollingPolicy> <fileNamePattern> xml element to change the log location path or filename pattern. The default value and formatting for naming is:
    /var/log/syncp-storage/storage-%d{yyyy-MM-dd}.log.gz
  3. It is possible to add an environment variable (such as HOSTNAME) to the log file name, like this:
    <fileNamePattern>/var/log/syncp-storage/${HOSTNAME}-storage-%d{yyyy-MM-dd}.log.gz</fileNamePattern>

Changing the log retention period

  1. Edit /etc/syncp-storage/logger.xml
    sudo vi etc/syncp-storage/logger.xml
  2. Modify the <maxHistory> setting to the number of archive files to keep (the default is 7 days). Note that the rollover period is determined by the format in <fileNamePattern>.
    <maxHistory>7</maxHistory>

Changing the log level

  1. The log level can be set to one of the following: INFO, WARN, ERROR, ALL, DEBUG, TRACE, OFF. The default logging level is INFO, which provides a moderate level of logged data covering INFO, WARN and ERROR messages. To change this, modify the 'level' setting in the following line in logger.xml:
    <logger name="application" level="INFO" />


Related Links