Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 0.9.28
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
When logging with scan="true" it is possible to stop all logging of an application silently.
Steps to reproduce:
- start an application with valid configuration and scan=true
- break the logback.xml (leave out a quote or something)
-> log goes silent
Expected behavior:
Logger fails to load new config and keeps running on the old configuration (like when valid xml, but invalid configuration is loaded).
I've found several problems in the code that relate to this and make it harder to patch.
1. status is printed from the Interpreter
Interpreter#callEndAction line 315
This means that errors are not printed in case the xml is invalid (SaxParseException), so the call to addError in ReconfigureOnChangeFilter line 163 is moot in that case
2. ReconfigureOnChangeFilter calls reset before doConfigure
This means that if doConfigure fails on invalid xml the old configuration is already reset. If I move reset to after doConfigure it won't work either obviously. I think there is a design problem here.
I've forked logback on github and I'll send a merge request for the test code I wrote.