You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Naveen Velicheti (JIRA)" <ji...@apache.org> on 2014/09/29 22:24:35 UTC

[jira] [Comment Edited] (LOG4J2-524) Feature request: auto-delete older rolled over files

    [ https://issues.apache.org/jira/browse/LOG4J2-524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14152192#comment-14152192 ] 

Naveen Velicheti edited comment on LOG4J2-524 at 9/29/14 8:24 PM:
------------------------------------------------------------------

Hi,
Is there any fix created for this?
I am also looking for deleting my old files which are rolled over based on time (Every Day in my case).
That maxAge parameter seems good to me. But is that implemented in any beta version?


was (Author: vsnaveen1):
Hi,
Did we create any fix for this?
I am also looking for deleting my old files which are rolled over based on time (Every Day in my case).
That maxAge parameter seems good to me. But is that implemented in any beta version?

> Feature request: auto-delete older rolled over files
> ----------------------------------------------------
>
>                 Key: LOG4J2-524
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-524
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 2.0-beta9, 2.0-rc1
>            Reporter: Remko Popma
>              Labels: Rollover
>             Fix For: 2.2
>
>
> This issue was raised by Kireet on the log4j-user mailing list:
> I am trying to use the rolling file appender in log4j2, basically I want to roll at midnight daily and keep 3 old log files. New files are created properly, but log4j doesn't seem to be cleaning up the old files. Does log4j only support cleanup of files within the time period? Here is the relevant portion of the config. I tried things with and without the %i pattern.
> {code}
>     <RollingFile name="Event" fileName="app.log"
>                  filePattern="app-%d{yyyy-MM-dd}.%i.log">
>       <PatternLayout>
>         <Pattern>%m%n</Pattern>
>       </PatternLayout>
>       <Policies>
>         <TimeBasedTriggeringPolicy interval="1" modulate="true"/>
>       </Policies>
>       <DefaultRolloverStrategy compressionLevel="0" max="3"/>
>     </RollingFile>
> {code}



--
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