Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action rules are not added to Rule Store #716

Open
matus753 opened this issue Oct 17, 2023 · 4 comments
Open

Action rules are not added to Rule Store #716

matus753 opened this issue Oct 17, 2023 · 4 comments

Comments

@matus753
Copy link

matus753 commented Oct 17, 2023

Why is in this class action only created, but addRule is commented in version 1.4.11 ch.qos.logback.core.joran.spi.SimpleRuleStore#addRule(ch.qos.logback.core.joran.spi.ElementSelector, java.lang.String)

we are not able to use censoring from com.tersesystems.logback:logback-censor because line below in our logback is basicaly useless

<newRule pattern="*/censor" actionClass="com.tersesystems.logback.censor.CensorAction"/>

the problem is that ch.qos.logback.core.joran.action.NewRuleAction#begin on line 51 is calling old ec.getSaxEventInterpreter().getRuleStore().addRule(new ElementSelector(pattern), actionClass); addRule method which have commented line on addRule() after initialization of new action

@matus753
Copy link
Author

there is even proposed solution #681

@Frettman
Copy link

Are there any alternatives to providing your own JoranConfigurator (might be difficult in Spring Boot that already provides its own)? I've seen the NewRuleProvider but that doesn't seem to be used anywhere.

@matus753
Copy link
Author

matus753 commented Nov 16, 2023

we have this problem because we are using logback-censor and directly in documentation you can see that we should use newRule https://tersesystems.github.io/terse-logback/guide/censor/, Any possible workaround would be appreciated how to be able to use logback censoring at newest version of logback

@zbytt
Copy link

zbytt commented Jan 10, 2024

+1 - I am experiencing the same issue, also regarding censor + spring usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants