Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042556
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformcriticalalways2019-12-13 14:042019-12-20 09:34
ReporterjarmendarizView Statuspublic 
Assigned Tojarmendariz 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionba35b5274a4a
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0042556: Logs older than 30 days are not removed during log rotation

DescriptionUsing the default Openbravo log4j configuration, during rollover log files are limited to max 30 files, but this limitation applies only during a single day. Logs from previous days are not removed and the number of log files can grow indefinitely.
Steps To ReproduceUsing an Openbravo instance with the default log4j configuration that generates log files for more than 30 days, check that there are more than 30 files and older logs are not removed when creating new log files.
Proposed SolutionAdd a <Delete/> rule in log4j-web.xml that determines that files older than 30 days ago should be removed.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0039504 closedjarmendariz Upgrade Log4j to version 2 
depends on backport 00425773.0PR19Q4.1 closedjarmendariz Logs older than 30 days are not removed during log rotation 
depends on backport 00425783.0PR19Q3.3 closedjarmendariz Logs older than 30 days are not removed during log rotation 

-  Notes
(0116368)
alostale (developer)
2019-12-17 09:11

https://gitlab.com/openbravo/product/openbravo/merge_requests/27 [^]
(0116405)
hgbot (developer)
2019-12-18 12:27

Repository: erp/devel/pi
Changeset: ba35b5274a4a1999a7c160e3dccd5a21f00f6d2d
Author: Javi Armendáriz <katanagari <at> gmail.com>
Date: Fri Dec 13 14:48:25 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ba35b5274a4a1999a7c160e3dccd5a21f00f6d2d [^]

Fixed BUG-42556: Adding remove log archive policy to prevent indefinite growth.

Using current log4j config, only files under the same period of time are limited
(i.e. when logfile is bigger than 100MB, there can be max 30 log archives for the
same day).

The new rule added applies to log archives with the format openbravo-*.log.gz and
will remove the oldest archive until there are max 30 files. This process will be
performed every time a log rollover occurs.

This commit also adds a build validation step that overrides the current config
with the updated one _only_ if its a exact copy of the previous default config.

---
M config/log4j2-web.xml.template
M src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/CopyLog4jConfigurationFromTemplates.class
M src-util/buildvalidation/src/org/openbravo/buildvalidation/CopyLog4jConfigurationFromTemplates.java
---
(0116434)
AugustoMauch (developer)
2019-12-19 13:29

Code reviewed and verified

- Issue History
Date Modified Username Field Change
2019-12-13 14:04 jarmendariz New Issue
2019-12-13 14:04 jarmendariz Assigned To => jarmendariz
2019-12-13 14:04 jarmendariz Modules => Core
2019-12-13 14:04 jarmendariz Triggers an Emergency Pack => No
2019-12-16 10:50 jarmendariz Relationship added related to 0039504
2019-12-16 17:07 jarmendariz Review Assigned To => alostale
2019-12-17 08:46 alostale Review Assigned To alostale => AugustoMauch
2019-12-17 08:47 alostale Status new => scheduled
2019-12-17 09:11 alostale Note Added: 0116368
2019-12-18 12:27 hgbot Checkin
2019-12-18 12:27 hgbot Note Added: 0116405
2019-12-18 12:27 hgbot Status scheduled => resolved
2019-12-18 12:27 hgbot Resolution open => fixed
2019-12-18 12:27 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ba35b5274a4a1999a7c160e3dccd5a21f00f6d2d [^]
2019-12-19 13:29 AugustoMauch Note Added: 0116434
2019-12-19 13:29 AugustoMauch Status resolved => closed
2019-12-20 09:34 alostale Severity major => critical


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker