Follow

Rotate 'debug.log' hourly

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: 

<!-- 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>
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.