[logback-user] TimeBasedRollingPolicy

paha ch_pasha at yahoo.com
Sun Apr 19 16:14:41 CEST 2009


Well ... i found the solution :jumping:

in GenericConfigurator class in method doConfigure the event chain is build
with recorder.recordEvents(inputSource). at this stage the event for setting
the file property is recordered AFTER event, that defines RollingPolicy
because...the configuration file looks like



>         <rollingPolicy
> class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
>            
> <FileNamePattern>logfile.%d{yyyy-MM-dd_HH-mm}.log.zip</FileNamePattern>
>             <MaxHistory>30</MaxHistory>
>         </rollingPolicy>
> 
>         < param name="File" value= ...
> 

after looking at event chain sequence i found the solution :
it is dump and simple - put < param > before <rollingPolicy> in
configuration file and everything works as it should %-|

-- 
View this message in context: http://www.nabble.com/TimeBasedRollingPolicy-tp19756004p23123386.html
Sent from the Logback User mailing list archive at Nabble.com.



More information about the Logback-user mailing list