-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
I noticed a portion of our CPU was going into level.Debug(...).Log() lines, although that level wasn't enabled.
I think what is happening is the Log() call goes into context.Log() first, which calls bindValues which is the expensive part, calling runtime.Caller, formatting a timestamp, etc., then after that it goes to level.Log() which discards everything.
I looked around but didn't find any previous debate on this point. Am I holding it wrong? Is this expected?
Since we are using a wrapper, something like go-kit/kit#322 would let us work around the problem by checking before doing the work, but that was rejected.
Metadata
Metadata
Assignees
Labels
No labels