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

Merged
merged 1 commit into from
Jan 30, 2020
Merged

Remove logp.Warn from fmtstr #15943

merged 1 commit into from
Jan 30, 2020

Conversation

urso
Copy link

@urso urso commented Jan 29, 2020

  • 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.
@urso urso requested a review from a team January 29, 2020 20:44
@urso urso added refactoring review Team:Services (Deprecated) Label for the former Integrations-Services team libbeat labels Jan 29, 2020
@urso urso merged commit f3a8440 into elastic:master Jan 30, 2020
@urso urso deleted the logp-global-fmtstr branch January 30, 2020 21:27
urso pushed a commit to urso/beats that referenced this pull request Jan 30, 2020
Properly wrap error and explain the reason for failure in the error
message instead of logging it.

(cherry picked from commit f3a8440)
@urso urso mentioned this pull request Jan 30, 2020
2 tasks
@urso urso added the v7.7.0 label Jan 30, 2020
urso pushed a commit that referenced this pull request Jan 31, 2020
Properly wrap error and explain the reason for failure in the error
message instead of logging it.

(cherry picked from commit f3a8440)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libbeat refactoring review Team:Services (Deprecated) Label for the former Integrations-Services team v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants