If you are using the .Net Framework v2.x, you can add the compression
functionality yourself by using the System.IO.Compression.GZipStream to
compress the file.

Phillip Ring
 
 
> -----Original Message-----
> From: Ron Grabowski [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 30, 2006 3:49 PM
> To: Log4NET User
> Subject: Re: Compress & Delete old logs
> 
> The RollingFileAppender does not have compression support built-in.
> What should happen if I set my rolling log file size to 200mb? Should
> my application stop responding until the compression process is
> complete?
> 
> According to this page:
> 
> http://tinyurl.com/q48hv
> http://logging.apache.org/log4net/release/sdk/log4net.Appender.RollingFile
> Appender.MaxSizeRollBackups.html
> 
> The MaxSizeRollBackups property is "the maximum number of backup files
> that are kept before the oldest is erased".
> 
> Are you able to roll files on a daily basis then run another program
> every day to compress old log files? There may be general purpose
> command line utilities that do this already.
> 
> --- Michael Schall <[EMAIL PROTECTED]> wrote:
> 
> > Is there a way with the rollingfile appender to have it compress
> > itself as it is rolling to the next file?  I would name my logs by
> > date, and would like the old files to compress (zip, cab, some format
> > readable without extra installs) as a new file is being created.
> >
> > Also, is it possible to have a max number of files saved?  We would
> > like to only keep the last x days of logs.
> >
> > So day to day the files would be compressed and after x days, the
> > compressed files would be removed.
> >
> > Is this possible currently, or planned in the future?
> >
> > Mike
> >


Reply via email to