Details
-
Wish
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.0-beta9
-
None
-
None
-
Linux, Java 1.7, Maven
Description
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:
<DefaultRolloverStrategy max="100"/>
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?
Attachments
Issue Links
- duplicates
-
LOG4J2-435 Feature request: auto-delete older log files
- Resolved