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

Remove logp.Warn from fmtstr (#15943) #15970

Merged
merged 1 commit into from
Jan 31, 2020
Merged

Conversation

urso
Copy link

@urso urso commented Jan 30, 2020

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

  • Refactoring

What does this PR do?

Properly wrap error and explain the reason for failure in the error
message instead of logging it.

Why is it important?

  • Reduce usage of global logp functions.
  • Once the error is logged, it will contain more context. The failure + reason for the failure will now be logged in the same message, by the subsystem that failed to create the format string.

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

Properly wrap error and explain the reason for failure in the error
message instead of logging it.

(cherry picked from commit f3a8440)
@urso urso changed the title Cherry-pick #15943 to 7.x: Remove logp.Warn from fmtstr Remove logp.Warn from fmtstr (#15943) Jan 31, 2020
@urso urso merged commit 40a9b3f into elastic:7.x Jan 31, 2020
@urso urso deleted the backport_15943_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