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

Cherry-pick #15946 to 7.x: Remove debug logging from keystore #15969

Merged
merged 1 commit into from
Jan 31, 2020

Conversation

urso
Copy link

@urso urso commented Jan 30, 2020

Cherry-pick of PR #15946 to 7.x branch. Original message:

  • Refactoring

What does this PR do?

This changes removes debug logging from the keystore.

Why is it important?

Aim is to remove the need for global logger functions.

I first tried to pass a logger and fix up dependends. But then I realized that the keystore is loaded before the configuration file is loaded. The logging subsystem is only setup once the configuration file is loaded, which means that some debug messages are never printed anyways. Trying to pass a logger into the Keystore will have the keystore use an uninitialized logger.

When unpacking configs debug logs might have been written. These are also removed debug logs. But I don't think removing them is a big loss (debug log was only written if the key was actually found in the keystore...). @ph WDYT?

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

Use cases

Screenshots

Logs

The keystore is loaded before the configuration file is loaded, which
means that some debug messages are never printed, because logging is still
not initialized (logs will be discarded).

(cherry picked from commit 56924a3)
@urso urso merged commit d6e2963 into elastic:7.x Jan 31, 2020
@urso urso deleted the backport_15946_7.x branch January 31, 2020 13:43
@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
Labels
backport review Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants