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 "Joe Merten (JIRA)" <ji...@apache.org> on 2013/12/28 04:15:50 UTC

[jira] [Created] (LOG4J2-480) TimeBasedTriggeringPolicy with limited number of files

Joe Merten created LOG4J2-480:
---------------------------------

             Summary: TimeBasedTriggeringPolicy with limited number of files
                 Key: LOG4J2-480
                 URL: https://issues.apache.org/jira/browse/LOG4J2-480
             Project: Log4j 2
          Issue Type: Wish
          Components: Appenders
    Affects Versions: 2.0-beta9
         Environment: Linux, Java 1.7, Maven
            Reporter: Joe Merten


In my application, I need a RollingFile-Appender with a TimeBasedTriggeringPolicy (e.g. 1 file each day with a filePattern="log-%d(yyyy-MM-dd).log").
The oldes logfiles should been erased automatically when a limit is reached (e.g. max 100 files). 

On the first view, it looks that this could be configured using:
{noformat}
  <DefaultRolloverStrategy max="100"/>
{noformat}
but for me it looks, that this setting does not work within this context.

I have quite spend a few hours to solve this requirement but failed for now.
For may be i'd done wrong things, could you give a small sample log4j2.xml which do this job?




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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