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

Reduce use of global loggers in libbeat/common #16149

Merged
merged 2 commits into from
Feb 19, 2020

Conversation

urso
Copy link

@urso urso commented Feb 6, 2020

  • Refactoring

What does this PR do?

Remove usage of logp.Debug/Warn by creating a logger instance in the GenericEventNormalizer. The Normalizer uses logp.New for now to keep the change less disruptive.

Why is it important?

Getting rid of global loggers functions.

Checklist

  • My code follows the style guidelines of this project
    - [ ] I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

@urso urso added review refactoring libbeat needs_backport PR is waiting to be backported to other branches. Team:Beats labels Feb 6, 2020
@urso urso requested a review from ycombinator February 6, 2020 20:04
libbeat/common/event.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

Left a nit. Otherwise LGTM.

@urso urso merged commit 3c78454 into elastic:master Feb 19, 2020
@urso urso deleted the events-logp-methods branch February 19, 2020 13:41
@urso urso added v7.7.0 and removed needs_backport PR is waiting to be backported to other branches. labels Feb 19, 2020
urso pushed a commit to urso/beats that referenced this pull request Feb 19, 2020
* Reduce use of global loggers in libbeat/common

* review

(cherry picked from commit 3c78454)
urso pushed a commit that referenced this pull request Feb 19, 2020
* Reduce use of global loggers in libbeat/common

* review

(cherry picked from commit 3c78454)
kvch pushed a commit to kvch/beats that referenced this pull request Feb 20, 2020
* Reduce use of global loggers in libbeat/common

* review
@andresrc andresrc added the Team:Integrations Label for the Integrations team label Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants