You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Is...@ny.frb.org on 2002/07/23 17:37:00 UTC

Re: AW: Limit for files created

RollingFileAppender creates new logs when a size limit is reached.  I want
to keep writing to the file regardless of size for the whole day, hence the
use of DailyRollingFileAppender.


                                                                                                       
                    "Auinger, Thomas"                                                                  
                    <Thomas.Auinger@wincor-ni       To:     "'Log4J Users List'"                       
                    xdorf.com>                       <lo...@jakarta.apache.org>                   
                                                    cc:                                                
                    07/23/2002 10:17 AM             Subject:     AW: Limit for files created           
                    Please respond to "Log4J                                                           
                    Users List"                                                                        
                                                                                                       
                                                                                                       




from the DOCUMENTATION of RollingFileAppender:

"public void setMaxBackupIndex(int maxBackups)

Set the maximum number of backup files to keep around.

The MaxBackupIndex option determines how many backup files are kept
before the oldest is erased. This option takes a positive integer
value. If set to zero, then there will be no backup files and the
log file will be truncated when it reaches MaxFileSize."


RTFM!


> -----Ursprüngliche Nachricht-----
> Von: Isaac.Goldstein@ny.frb.org [mailto:Isaac.Goldstein@ny.frb.org]
> Gesendet: Dienstag, 23. Juli 2002 16:11
> An: log4j-user@jakarta.apache.org
> Betreff: Limit for files created
>
>
> Hi all:
>
> Can you limit the amount of files created by
> DailyRollingFileAppender?  I
> have it set up to create a new one each day but I don't want
> it to exceed
> 10 files.  I know that the J2SE 1.4 logging package allows this - does
> log4j offer this ability as well?
>
> Thanks
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org
>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org
>






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>