
Hi, I am new to logback. I am trying to configure the time and rolling policy for a rolling file appender. Here's what I need: 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) 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) I'd like "x" to be 15 mins, but if that's not doable, I can live with "x = 1 minute". Here's my config, which doesn't seem to do exactly what I've described: <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${user.home}/impression_logs/impressions.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${user.home}/impression_log_archives/${HOSTNAME}/impressions.%d{yyyy-MM-dd-hh-mm}.%i.log</fileNamePattern> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>1MB</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <encoder> <pattern>%msg%n</pattern> </encoder> </appender> Can some one help me with this ? -- Manoj M