Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
starting point for doc on how log contexts are supposed to work
Browse files Browse the repository at this point in the history
  • Loading branch information
ara4n committed May 4, 2016
1 parent 7ea3b41 commit 8a04412
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/log_contexts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
What do I do about "Unexpected logging context" debug log-lines everywhere?

<Mjark> The logging context lives in thread local storage
<Mjark> Sometimes it gets out of sync with what it should actually be, usually because something scheduled something to run on the reactor without preserving the logging context.
<Matthew> what is the impact of it getting out of sync? and how and when should we preserve log context?
<Mjark> The impact is that some of the CPU and database metrics will be under-reported, and some log lines will be mis-attributed.
<Mjark> It should happen auto-magically in all the APIs that do IO or otherwise defer to the reactor.
<Erik> Mjark: the other place is if we branch, e.g. using defer.gatherResults

Unanswered: how and when should we preserve log context?

0 comments on commit 8a04412

Please sign in to comment.