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 #7965 to 6.x: Add debug check to logp.Logger #9611

Merged
merged 1 commit into from
Dec 18, 2018

Conversation

andrewkroh
Copy link
Member

Cherry-pick of PR #7965 to 6.x branch. Original message:

This PR adds a debug check

I made sure to check if Desugar() is expensive or not. The API is documented as follows:

// Desugar unwraps a SugaredLogger, exposing the original Logger. Desugaring
// is quite inexpensive, so it's reasonable for a single application to use
// both Loggers and SugaredLoggers, converting between them on the boundaries
// of performance-sensitive code.

This PR adds a debug check

I made sure to check if `Desugar()` is expensive or not.  The API is documented as follows:

```
// Desugar unwraps a SugaredLogger, exposing the original Logger. Desugaring
// is quite inexpensive, so it's reasonable for a single application to use
// both Loggers and SugaredLoggers, converting between them on the boundaries
// of performance-sensitive code.
```

(cherry picked from commit 5b54084)
@andrewkroh
Copy link
Member Author

This is needed to satisfy some code in the Netflow input that was backported to 6.x.

@andrewkroh andrewkroh merged commit 0658be4 into elastic:6.x Dec 18, 2018
@andrewkroh andrewkroh deleted the backport_7965_6.x branch January 14, 2022 14:06
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.

3 participants