-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Log NotEntitledExceptions using logger with <component>.<package> suffix #131031
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
Log NotEntitledExceptions using logger with <component>.<package> suffix #131031
Conversation
…fix rather than <component>.<module> for more fine-grained mutes. Relates to ES-12231
Pinging @elastic/es-core-infra (Team:Core/Infra) |
} | ||
|
||
private void notEntitled(String message, Class<?> callerClass, ModuleEntitlements entitlements) { | ||
private void notEntitled(String message, Class<?> requestingClass, ModuleEntitlements entitlements) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fixes a potential NPE: if callerClass != null, requestingClass is callerClass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Just double check please if any of the existing mutes need updating to go with this change.
Ugh, you're right @ldematte ... and the current mutes have no comment as for which class failed previously, particularly hard with Changed it to |
It's a bit unfortunate to be burdened with legacy already, so early in the lifecycle of this project, but I can live with this if Lorenzo likes it.
If we wanted to go with The initial set of muted warnings probably occur during the CI tests, so we could probably delete the mutes and look for warnings in the CI output to determine the packages for those. For mutes added later, a git blame could take us to the PR that added them, and hopefully the PR would record enough info that we could determine the package name. |
If we want, could we use a different separator? And/or make |
I checked old PRs that added mutes, there's not much context documented there :/
Making |
An alternative could be to have both It's just not vanilla log4j anymore that way and one has to remember there's two different ways of doing mutes. |
Let's go with the current scheme then ( |
…#131031) Log NotEntitledExceptions using logger with `<component>.<module>.<package>` suffix (instead of `<component>.<module>`) for more fine-grained mutes, but remaining backwards compatible regarding existing mutes. Relates to ES-12231
…#131031) Log NotEntitledExceptions using logger with `<component>.<module>.<package>` suffix (instead of `<component>.<module>`) for more fine-grained mutes, but remaining backwards compatible regarding existing mutes. Relates to ES-12231
#131290) Log NotEntitledExceptions using logger with `<component>.<module>.<package>` suffix (instead of `<component>.<module>`) for more fine-grained mutes, but remaining backwards compatible regarding existing mutes. Relates to ES-12231
#131289) Log NotEntitledExceptions using logger with `<component>.<module>.<package>` suffix (instead of `<component>.<module>`) for more fine-grained mutes, but remaining backwards compatible regarding existing mutes. Relates to ES-12231
Log NotEntitledExceptions using logger with
<component>.<package>
suffix rather than<component>.<module>
for more fine-grained mutes.Relates to ES-12231