logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Göran Roseen <go...@roseen.se>
Subject RE: Compression tool
Date Fri, 03 Feb 2006 09:24:56 GMT

I have been thinking all along as new requests for features in the rolling
file appender comes in; "This should really be done with logrotate", a Unix
tool that is specialized in rotating log files.

Today I googled around a little, and to my astonishment I realized that it
seems like no one has made a windows port of logrotate. Really strange!

But apparently, having logs in files (as opposed to the Event Log or a
database) is not the windows way, and those servers that do log to files
(like IIS), generally include their own rolling mechanism, reducing the need
for a general solution.

Still, how you want to name and store your log files is a matter with so
many variables, so I think that we should set a limit for what the rolling
file appender should do, and leave the fancy parts for external solutions,
even if that means that some of us will have to build our own log rotating
tools for Windows...

In my opinion, the rolling file appender as already grown too complex, with
several configuration parameters whose side effects in cooperation with
other parameters are hard to foresee without reading the source.

/Göran Roseen

If anyone knows of a windows port of logrotate, please shout!

-----Original Message-----
From: Ron Grabowski [mailto:rongrabowski@yahoo.com] 
Sent: den 3 februari 2006 04:50
To: Log4NET User
Subject: Re: Compression tool

Being a log4net user, I would imagine you could probably write up a
utitlity to do this file merging yourself. I don't think this falls
into the scope of log4net. Be carfeul that you're program doesn't have
a file lock on a file when log4net is renaming the files.

--- Morten Andersen <morten@vianett.no> wrote:

> When I use the rolling file appender I get files like this:
> Example.log
> Example.log.1
> Example.log.2006-01-01
> Example.log.2006-01-01.1
> Example.log.2006-01-01.2
> Example.log.2006-01-01.3
> Example.log.2005-12-06
> Example.log.2006-12-06.1
> Now I want to join, and compress the files with a date stamp to save 
> disk space like this:
> Example.log
> Example.log.1
> Example.log.2006-01-01.gz
> Example.log.2005-12-06.gz
> Is it anyone out there who have heard of such a tool?
> -- 
> Best Regards
> *Morten Andersen*
> Developer
> Vianett AS <http://www.vianett.no/> | morten@vianett.no 
> <mailto:morten@vianett.no> | Office: +47 69 20 69 74 
> <callto://+4769206974> | Skype: mortander <callto://mortander>

View raw message