-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Hi,
I'm a bit confused by your example of how logging should be done for non-constant data.
I don't think your example in the readme works.
logger.info(
"Hello {world}",
extra=dict(
world="Earth"
)
)
Just leads to "Hello {world}" being logged as the extra dictionary is for filling in format arguments.
So something like:
logging.basicConfig(format="%(message)s %(world)s")
logger.info(
"Hello",
extra=dict(
world="Earth"
)
)
Will print out "Hello Earth", but obviously that isn't so useful for logging non-constant data that you don't want in every log message.
Am I missing something in my logging config that allows the extra dict to be used as you suggest?
1-bit, steven-murray, bcfurtado, RayJameson, TommasoAmici and 7 morechristophmeissner and bcfurtado
Metadata
Metadata
Assignees
Labels
No labels