We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68b7644 commit fb65e44Copy full SHA for fb65e44
1 file changed
src/nypl_py_utils/functions/log_helper.py
@@ -22,9 +22,10 @@ def get_structlog(module):
22
"message": "this is a test log event"
23
}
24
25
- Note that: 1) using bind_contextvars will bind variables to *all* loggers
26
- that have been created, and 2) you cannot use the same module name for a
27
- structlog and for a standard logger
+ Note that: 1) you should *NOT* use the same module name for a structlog
+ and for a standard logger, and 2) using bind_contextvars will bind
+ variables to *all* loggers. To bind a context variable on one logger
28
+ without binding it to others, use `logger = logger.bind(contextvar=0)`.
29
"""
30
logger = logging.getLogger(module)
31
logger.addHandler(logging.StreamHandler(sys.stdout))
0 commit comments