Skip to content

Commit fb65e44

Browse files
Update log helper comment
1 parent 68b7644 commit fb65e44

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/nypl_py_utils/functions/log_helper.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ def get_structlog(module):
2222
"message": "this is a test log event"
2323
}
2424
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
25+
Note that: 1) you should *NOT* use the same module name for a structlog
26+
and for a standard logger, and 2) using bind_contextvars will bind
27+
variables to *all* loggers. To bind a context variable on one logger
28+
without binding it to others, use `logger = logger.bind(contextvar=0)`.
2829
"""
2930
logger = logging.getLogger(module)
3031
logger.addHandler(logging.StreamHandler(sys.stdout))

0 commit comments

Comments
 (0)