Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
1.4.4, 1.3.4
-
None
Description
New rules registered with the <newRule> keyword don't seem to be activated.
Example:
<configuration> <newRule pattern="*/stack" class="...." /> <stack .../> </configuration>
This sample configuration produces the following messages when debug is enabled:
INFO ... NewRuleAction - About to add new Joran parsing rule [*/stack, <classname>].
...
WARN ... ImplicitModelHandler - Ignoring unknown property [stack] in [ch.qos.logback.classic.LoggerContext]
After some investigations it happens that the new Action rule is created but not actually registered in the rule store - the code is commented, see SimpleRuleStore#addRule().
As far as I can tell, the SimpleRuleStore now expects rules to be registered using a Supplier<Action> instead of a rule instance. Unfortunately, the <newRule> action is not updated and keeps registering instances instead of a supplier.
This prevents from registering and using custom rules in a Logback XML configuration.
Attachments
Issue Links
- duplicates
-
LOGBACK-1637 Restore support for new configuration rules
- Open