logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davide Steduto (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-1536) Compressing aged Rolled Files, keep last X file uncompressed
Date Fri, 19 Aug 2016 22:14:20 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-1536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Davide Steduto updated LOG4J2-1536:
-----------------------------------
    Description: 
{{RollingRandomAccessFileAppender}} and {{RollingFileAppender}} currently support the configuration
to compress automatically files _every time_ it rolls and to delete compressed file after
Y days under provided conditions, but it compresses at every rolling while we should have
the possibility to keep the last X rolled files uncompressed before it starts the compression.

Usually when we investigate, we do it for few days back, therefore those files should remain
uncompressed without the need to decompress the file that just rolled (for instance: midnight
is just passed).

I would add a new attribute named *max="5"* (keep last 5 logs uncompressed). You choose the
name. Default value = 0 (it always compresses).

{code:xml}
<RollingRandomAccessFile name="file" fileName="${baseDir}/app-trace.log"
               filePattern="${baseDir}/app-trace-%d{yyyy-MM-dd}.log.gz" max="5"
               immediateFlush="false" append="true">
...
</RollingRandomAccessFile>
{code}

Thank you,
Davide

  was:
{{RollingRandomAccessFile}} and {{RollingFileAppender}} currently support the configuration
to compress automatically files _every time_ it rolls and to delete compressed file after
Y days under provided conditions, but it compresses at every rolling while we should have
the possibility to keep the last X rolled files uncompressed before it starts the compression.

Usually when we investigate, we do it for few days back, therefore those files should remain
uncompressed without the need to decompress the file that just rolled (for instance: midnight
is just passed).

I would add a new attribute named *max="5"* (keep last 5 logs uncompressed). You choose the
name. Default value = 0 (it always compresses).

{code:xml}
<RollingRandomAccessFile name="file" fileName="${baseDir}/app-trace.log"
               filePattern="${baseDir}/app-trace-%d{yyyy-MM-dd}.log.gz" max="5"
               immediateFlush="false" append="true">
...
</RollingRandomAccessFile>
{code}

Thank you,
Davide


> Compressing aged Rolled Files, keep last X file uncompressed
> ------------------------------------------------------------
>
>                 Key: LOG4J2-1536
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1536
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Appenders
>            Reporter: Davide Steduto
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> {{RollingRandomAccessFileAppender}} and {{RollingFileAppender}} currently support the
configuration to compress automatically files _every time_ it rolls and to delete compressed
file after Y days under provided conditions, but it compresses at every rolling while we should
have the possibility to keep the last X rolled files uncompressed before it starts the compression.
> Usually when we investigate, we do it for few days back, therefore those files should
remain uncompressed without the need to decompress the file that just rolled (for instance:
midnight is just passed).
> I would add a new attribute named *max="5"* (keep last 5 logs uncompressed). You choose
the name. Default value = 0 (it always compresses).
> {code:xml}
> <RollingRandomAccessFile name="file" fileName="${baseDir}/app-trace.log"
>                filePattern="${baseDir}/app-trace-%d{yyyy-MM-dd}.log.gz" max="5"
>                immediateFlush="false" append="true">
> ...
> </RollingRandomAccessFile>
> {code}
> Thank you,
> Davide



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message