Skip to content

Commit

Permalink
Fix contextvars docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Elad Namdar committed Feb 4, 2021
1 parent 827d96b commit 00bf80d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/contextvars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ The general flow is:
>>> # Then use loggers as per normal
>>> # (perhaps by using structlog.get_logger() to create them).
>>> log.msg("hello")
a=1 b=2 event='hello'
event='hello' a=1 b=2
>>> # Use unbind_contextvars to remove a variable from the context
>>> unbind_contextvars("b")
>>> log.msg("world")
a=1 event='world'
event='world' a=1
>>> # And when we clear the threadlocal state again, it goes away.
>>> clear_contextvars()
>>> log.msg("hi there")
Expand Down

0 comments on commit 00bf80d

Please sign in to comment.