Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (16 sloc) 518 Bytes

The JmxRollingFileAppender uses FixedWindowRollingPolicy by default.

logback configuration example:

<configuration scan="false" debug="false">
  <appender name="file" class="me.shimi.logback.rolling.JmxRollingFileAppender">
    <File>./logs/myLog.log</File>
    <encoder>
      <pattern>[%t] [%4p] [%d{ISO8601}] %c{1}: %m%n</pattern>
    </encoder>
    <fileNamePattern>./logs/myLog.log.%i</fileNamePattern>
  </appender>
  <root level="INFO">
    <appender-ref ref="file" />
  </root>
</configuration>