[
https://issues.jboss.org/browse/LOGMGR-139?page=com.atlassian.jira.plugin...
]
James Perkins commented on LOGMGR-139:
--------------------------------------
The trick is given the file name {{server.log.20161606}} how do you get {{20161606}} back
into a date format? It's possible you could assume the current {{suffix}} would be the
date format, but now there's potential to miss purging files. For example say you get
5 days of log files and shutdown the server every Friday and restart it Monday. If you
just take {{current_date - 5 days}} then you'd always miss purging Monday and Tuesdays
log files.
What I meant more by OS tools was using a cron job to delete files older than x days. For
example
{code}
find ${JBOSS_HOME}/standalone/log -name "server.log.*" -mtime +5 | xargs -I {}
rm "{}"
{code}
Given the configuration that should only rotate when the file reaches 1GB in size and keep
1 back up. So you should only ever have {{server.log}} and {{server.log.1}}. If it's
got a date pattern suffix then something else is rotating the file.
Add maxBackupIndex to periodic-rotating-file-handlers
-----------------------------------------------------
Key: LOGMGR-139
URL:
https://issues.jboss.org/browse/LOGMGR-139
Project: JBoss Log Manager
Issue Type: Enhancement
Reporter: Rémy Garrigue
Priority: Minor
That's all in the title.
We would like to have a daily log, keeping 15 days of log. Actually there's no way to
do that except maybe custom handler which we can't get to work. That'ld be far
easier if there was the same maxBackupIndex option as in size rotating handler.
Regards,
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)