-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Use child loggers broadly in PolicyManager #124896
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
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
D'oh indeed, Homer, d'oh indeed.
|
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.
Looks fine. One nit that could be a followup as it's not performance critical (only happens in case entitlement is being denied) and will likely require some refactoring.
libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/PolicyManager.java
Outdated
Show resolved
Hide resolved
Some of our unit tests check for equality of `ModuleEntitlements` objects, and they are entitled to do so (no pun intended).
FYI this will conflict with #124895. Update: I've resolved the conflict. |
* Use child loggers broadly in PolicyManager * Pass ModuleEntitlements to notEntitled * Store logger name instead of object. Some of our unit tests check for equality of `ModuleEntitlements` objects, and they are entitled to do so (no pun intended). * Alright, let's cache 'em * Memoize at point of creation, not point of use * Explanatory comments
* Use child loggers broadly in PolicyManager * Pass ModuleEntitlements to notEntitled * Store logger name instead of object. Some of our unit tests check for equality of `ModuleEntitlements` objects, and they are entitled to do so (no pun intended). * Alright, let's cache 'em * Memoize at point of creation, not point of use * Explanatory comments
* Use child loggers broadly in PolicyManager * Pass ModuleEntitlements to notEntitled * Store logger name instead of object. Some of our unit tests check for equality of `ModuleEntitlements` objects, and they are entitled to do so (no pun intended). * Alright, let's cache 'em * Memoize at point of creation, not point of use * Explanatory comments
* Use child loggers broadly in PolicyManager * Pass ModuleEntitlements to notEntitled * Store logger name instead of object. Some of our unit tests check for equality of `ModuleEntitlements` objects, and they are entitled to do so (no pun intended). * Alright, let's cache 'em * Memoize at point of creation, not point of use * Explanatory comments
* Use child loggers broadly in PolicyManager * Pass ModuleEntitlements to notEntitled * Store logger name instead of object. Some of our unit tests check for equality of `ModuleEntitlements` objects, and they are entitled to do so (no pun intended). * Alright, let's cache 'em * Memoize at point of creation, not point of use * Explanatory comments
We'd like to be able to adjust logging independently for different components / modules.