logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: Compressing only old rollover files
Date Wed, 09 Apr 2014 23:33:02 GMT
Be aware you can't combine the RandomAccessFile appenders with logrotate. See https://issues.apache.org/jira/browse/LOG4J2-354

Sent from my iPhone

> On 2014/04/10, at 7:58, Matt Sicker <boards@gmail.com> wrote:
> 
> It sounds like the "delaycompress" option from logrotate:
> http://linux.die.net/man/8/logrotate
> 
> 
>> On 9 April 2014 09:46, Ralph Goers <ralph.goers@dslextreme.com> wrote:
>> 
>> Log4j currently compresses the files when it rolls them over. Of course
>> you can cause that to happen based on time, but it sounds like you want the
>> time of rollover and time of compression to be separate.  If so, I am not
>> sure you really need to tie the compression activity to Log4j, or at least
>> the appender at all.  You just need something that monitors the directory
>> and looks for files over a certain age and then compresses them, deletes
>> them, or whatever.
>> 
>> If I’ve misunderstood what you are asking please let me know.
>> 
>> Ralph
>> 
>>> On Apr 9, 2014, at 12:57 AM, Manuel Teira <manuel.teira@gmail.com> wrote:
>>> 
>>> Hello all,
>>> 
>>> I'm evaluating a switch to log4j-2 since my application is required to
>>> rollover files by age and size (for what the composite triggering
>> policies
>>> come handy). The rollover files shall also be compressed, but only those
>>> reaching a given age.
>>> 
>>> What would be the preferred approach to achieve that using log4j-2?
>> Should
>>> be reasonable to write a custom rollover strategy or is there any other
>> way
>>> out-of-the box that may work?
>>> 
>>> Thanks and best regards,
>>> 
>>> Manuel.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 
> -- 
> Matt Sicker <boards@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message