[JIRA] Updates for LOGBACK-1701: Rules registered with newRule do not trigger

logback / LOGBACK-1701 [Open] Rules registered with newRule do not trigger ============================== Here's what changed in this issue in the last few minutes. This issue has been created This issue is now assigned to you. View or comment on issue using this link https://jira.qos.ch/browse/LOGBACK-1701 ============================== Issue created ------------------------------ Bertrand Renuart created this issue on 20/Oct/22 1:40 PM Summary: Rules registered with newRule do not trigger Issue Type: Bug Affects Versions: 1.3.4, 1.4.4 Assignee: Logback dev list Components: Joran, logback-core Created: 20/Oct/22 1:40 PM Priority: Major Reporter: Bertrand Renuart Description: New rules registered with the <newRule> keyword don't seem to be activated. Example: {code:java} <configuration> <newRule pattern="*/stack" class="...." /> <stack .../> </configuration> {code} This sample configuration produces the following messages when debug is enabled: {code:java} INFO ... NewRuleAction - About to add new Joran parsing rule [*/stack, <classname>]. ... WARN ... ImplicitModelHandler - Ignoring unknown property [stack] in [ch.qos.logback.classic.LoggerContext] {code} 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()|https://github.com/qos-ch/logback/blob/v_1.4.4/logback-core/src/main/java/ch...]. 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. ============================== This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)
participants (1)
-
QOS.CH (JIRA)