Log files configuration is performed in the file /opt/saymon-agent/conf/logback-upstart.xml.
Debug mode section
<appender name="FILE-DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>/var/log/saymon/saymon-agent.debug.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- Daily rollover --> <fileNamePattern>/var/log/saymon/saymon-agent.debug.%d{yyyy-MM-dd}.log.gz</fileNamePattern> <!-- Keep 10 days' worth of history --> <maxHistory>10</maxHistory> </rollingPolicy> <encoder> <pattern>%d{dd.MM.yyyy HH:mm:ss.SSS} [%-15thread] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender>
where
- <file>/var/log/saymon/saymon-agent.debug.log</file> is the location of the log file;
- <fileNamePattern>... .gz</fileNamePattern> is the pointer to archiving log-files to the .gz format;
- <maxHistory>10</maxHistory> is the duration of storage log files in days.
To disable debug mode comment the corresponding string in the section root as follows:
<!--<appender-ref ref="FILE-DEBUG"/>-->
General log section
Settings and structure of the general log section are similar to debug-mode section:
<appender name="FILE-INFO" class="ch.qos.logback.core.rolling.RollingFileAppender"> ... </appender>