Hi,<br><br>I am new to logback. I am trying to configure the time and rolling policy for a rolling file appender.<br><br>Here's what I need:<br><br>a) Every "x" minutes, I want it to roll the file regardless of how small the size of the live file is.(low logging rate)<br>
b) If within those "x" minutes, the live log file size exceeds "y" KBs, i want it to use indices like ${date_time}.0.log and ${date_time}.1.log and so on. ( high logging rate)<br><br>I'd like "x" to be 15 mins, but if that's not doable, I can live with "x = 1 minute".<br>
<br>Here's my config, which doesn't seem to do exactly what I've described:<br><br><appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"><br> <file>${user.home}/impression_logs/impressions.log</file><br>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"><br> <fileNamePattern>${user.home}/impression_log_archives/${HOSTNAME}/impressions.%d{yyyy-MM-dd-hh-mm}.%i.log</fileNamePattern><br>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"><br> <maxFileSize>1MB</maxFileSize><br> </timeBasedFileNamingAndTriggeringPolicy><br>
</rollingPolicy><br><br> <encoder><br> <pattern>%msg%n</pattern><br> </encoder><br></appender><br><br>Can some one help me with this ?<br><br>-- Manoj M<br>