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

Daniel Watford commented on OFBIZ-12897:
----------------------------------------

Hi [~jleroux] ,

It would be quite easy to clear out the log files directory as part of the 
update scripts that run daily on the demo host, but I'd rather not remove log 
files unnecessarily since we may want to investigate an issue with the demo 
sites from time to time and may need to rely on logs from a few days ago.

Instead I would rather utilise the log rolling functionality in log4j2 to 
remove older log files, keeping enough files around to cover a few days of log 
entries.

Also, I don't think the out-of-the box log4j2 configuration will remove older 
files as expected. Instead it will limit the number of files kept for each day 
to 10 files.

Summary: We could add a clean-up script to demo host, but I think we would 
still need to change the out of the box log4j2 configuration to remove older 
log files. I would therefore prefer we just alter the log4j2 configuration.

> Rework the log4j2.xml configuration to limit the number of log files generated
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-12897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12897
>             Project: OFBiz
>          Issue Type: Task
>          Components: framework
>    Affects Versions: Upcoming Branch, 18.12.11
>            Reporter: Daniel Watford
>            Priority: Minor
>
> File lo4j2.xml configure log file rolling, but it does not appear to function 
> as perhaps intended.
> Log file rolling is configured to keep up to 10 log files. But the log file 
> naming convention appears to cause a maximum of 10 logs files to be kept for 
> each day.
> Rework the log4j2.xml configuration file to ensure that only 10 log files are 
> kept (for each appender) regardless of the date.
> Also, a limit of 1MB is quite small these days, particularly as text editors 
> can easily search through larger files without a noticeable performance 
> penalty (YMMV). I recommend raising the log file size limit to 10MB as this 
> would keep more log entries around without a corresponding increase in the 
> number of file.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to