[logback-dev] rolling policy with starting new file on system startup

Ceki Gulcu listid at qos.ch
Thu Sep 27 21:42:34 CEST 2007


Hi Jozsef,

The first option on your list seems to me the most straightforward to implement. 
Would you care to enter a bug report asking for this feature?

Hontvari Jozsef wrote:
> I would add an option to the rolling appender to start a new file not
> only when the trigger fires but also when the system is started.
> This doesn't seem to be a difficult task but there are several possible
> solutions:
> 
> -it can be an option of the current trigger implementations. As I know
> actually there is only one trigger implementation, the other trigger
> type is only implicitly used with time based rolling
> 
> -it can be a standalone trigger, this is also useful if we don't want to
> limit the size of the log file
> 
> -there is an existing attribute of the file appender, named "append".
> This attribute already has a very similar (the same?) meaning. It causes
> to start a new log file on startup (i.e. delete its previous content).
> Currently if this "append" attribute is switched on then the rolling
> appender literally follows the previous definition and it overwrites the
> previous content of the last file, instead of rolling the last file.  It
> is unlikely that this is what the user wants.
> 
> For me the last alternative seems to be the best. What do you think?


-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch



More information about the logback-dev mailing list