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

[MENFORCER-488] Add EnforcerLogger.is<Level>Enabled() #279

Merged
merged 2 commits into from Jul 6, 2023

Conversation

kwin
Copy link
Member

@kwin kwin commented Jul 4, 2023

No description provided.

Copy link
Member

@slawekjaranowski slawekjaranowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for completion we can add is...Enabled for other levels

Copy link
Member

@slawekjaranowski slawekjaranowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one missing isWarnOrErrorEnabled

@kwin
Copy link
Member Author

kwin commented Jul 6, 2023

one missing isWarnOrErrorEnabled

I would prefer to leave that out, as the semantics is not clear from the name. It could mean both

  1. isWarnEnabled() || isErrorEnabled() or
  2. isWarnEnabled() && rule.getLevel() == EnforcerLevel.WARN || isErrorEnabled() && rule.getLevel() == EnforcerLevel.ERROR

Although one could clarify that in the javadoc the chance for misinterpretation is quite high and I would not add it until we see a real use case.

@kwin kwin merged commit 22ff3c7 into master Jul 6, 2023
30 checks passed
@slawekjaranowski slawekjaranowski deleted the feature/enforcer-logger-add-isDebugEnabled branch July 20, 2023 21:15
@slawekjaranowski slawekjaranowski changed the title [MENFORCER-488] Add EnforcerLogger.isDebugEnabled() [MENFORCER-488] Add EnforcerLogger.is<Level>Enabled() Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants