Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.1.1
-
Fix Version/s: None
-
Component/s: Configuration
-
Labels:None
Description
If you define a log4j closure in an external config file referenced from Config.groovy the initial configuration from Config.groovy remains and the new configuration is added in, but it doesn't replace the previous configuration options. This was different in 1.0 where it was property-based, but now that Log4j is configured using a DSL you can't override specific options, you have to redefine the whole closure.
This is ok with log levels but appenders that are redefined but use the same file result in double log entries.
LoggingGrailsPlugin calls LogManager.resetConfiguration() in onConfigChange and this is a workaround for external configs - add it as the first line if the log4j closure. But Log4jConfig.configure() should call LogManager.resetConfiguration() instead.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits