Closed 5er9e1 closed 3 months ago
It looks like you expect stdlib output to match structlog's output? Unfortunately that means that you have to teach those two to cooperate (or, as pointed out in https://www.structlog.org/en/stable/standard-library.html#suggested-configurations, configure them in their own ways to have the same output).
I assume https://stackoverflow.com/questions/78575692/how-to-use-structlog-with-logfmt-formatted-logs-in-python/78681766#78681766 is you too so closing.
I want to print out root logs in
logfmt
format.structlog
should print logs in the same format. I tried this example and looks like it doesn't work withlogfmt
.Here is a first try:
It prints:
Here is
structlog
is definitely not alogfmt
formatted.After this I tried to add render:
And fail again:
Obviously correct log line should be like:
Is it possible to format both
structlog
andlogging
aslogfmt
?