Ask the Community
Groups
Rotate 'debug.log' hourly - Connect IT Community | Kaseya
<main> <article class="userContent"> <p><strong>PROBLEM</strong></p> <p>The file 'debug.log' can grow to consume all disk space</p> <p><strong>CAUSE</strong></p> <p>Existing log rotation is ineffective. </p> <p><strong>RESOLUTION or WORKAROUND</strong></p> <p>In 'TRAVERSE_HOME\etc\logging\debug.xml' replace the existing 'appender' XML element (everything between the start and ending 'appender' tags) with the following example to rotate the 'debug' log file every hour and retain 24 files: </p> <pre class="code codeBlock" spellcheck="false" tabindex="0"><!-- appender used for capturing debug data from specific classes --> <appender name="FILEdebug" class="ch.qos.logback.core.rolling.RollingFileAppender"> <encoder> <pattern>%d{ISO8601} %c[%t]: \(%p\) \(%F:%L\) %m%n</pattern> </encoder> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>DEBUG</level> </filter> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <FileNamePattern>${LOGDIR}/debug-%d{yyyy-MM-dd-HH}.log</FileNamePattern> <maxHistory>24</maxHistory> </rollingPolicy> </appender></pre> <p> </p> <p>Debug Log files are generated here:</p> <pre class="code codeBlock" spellcheck="false" tabindex="0"><strong><traverse_home>/logs</strong></pre> <p> </p> <p> </p> <p> </p> <p><strong>APPLIES TO </strong></p> <p>Traverse version 9.1 and later.</p> <p><strong>REFERENCE </strong></p> <pre class="code codeBlock" spellcheck="false" tabindex="0">None.</pre> </article> </main>