Skip to content

Filtered-out log.Level lines still cost #15

Answered by ChrisHines
bboreham asked this question in Q&A
Discussion options

You must be logged in to vote

@bboreham I wouldn't say you are holding it wrong, but there may be one tweak to improve it. More on that later.

First, let me say up front, that the level package is not designed for raw performance, the behavior you describe is expected. But the level package is also separate from the log package precisely because we believed that there was no best way to approach it that would suit everyone's needs. My statement in go-kit/kit#322 (comment) still stands:

I do think that this is a viable approach for applications that require optimal performance when logging is disabled. There is no reason an application or organization can't use the technique in their own code, but I don't think the ne…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ChrisHines
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #14 on October 17, 2021 16:50.