-
Notifications
You must be signed in to change notification settings - Fork 27
Remove global logger usage #259
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
kruskall
left a comment
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 is a binary incompatible change
IMO we should pause until the library is in a good enough state to be bumped in all branches then gradually deprecated and remove
|
elastic/beats#46054. This PR will bump the version and accomodate this changeset |
kruskall
left a comment
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 is a breaking change so I'd rather not approve but left a review
It's a good point. Even though we don't do any compatibility promises, we tend to avoid breaking changes. A simple approach is to deprecate the exiting functions and create new ones receiving a logger. It's a bit more work, but it accomplishes the goal without a breaking change. Also, with that, it'd not be necessary to use the global loggers in the functions not used by the beats. They could still use the deprecated version of the functions. |
We've been doing breaking changes to get rid of global logger usages. We are making sure we do them with little impact as possible. There is also a PR up on beats to accomodate this when it is merged elastic/beats#46054 Some references where breaking changes are introduced: |
|
IMO adding a (deprecated) numcpu func with no arg that defaults to calling the new func with nooplogger should be good enough |
Well there is If there is a consensus that we want to do it this way then I'll change it. |
|
yeah the situation is not great :( |
|
@kruskall , @AndersonQ , can you take a look now? I introduced a new function for numcpu |
VihasMakwana
left a comment
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.
Some comments
|
Approving as there are no breaking changes anymore. Khushi has introduced new functions and deprecated old ones. |
What does this PR do?
This PR introduces new methods that accepts a logger. This is done to get rid of global loggers wherever they are used
This is required for beatreceivers to work.
Why is it important?
Checklist
CHANGELOG.mdAuthor's Checklist
Related issues