(This issue is not related to the third party lib used, I got the same thing with other third party libs, just needed one as a minimal repro case.)
This leads to a ton of exception that ends with:
File "/usr/lib64/python2.7/logging/init.py", line 328, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
My goal is to use structlog to get all my logs and those from imported third party libs to be formatted in JSON with a basic set of common keys. But I started with using the documentation as is first to understand how it works.
I was expecting boto3 logs to be formatted and it worked, somewhere in the console output (and the log file) there is:
2017-05-12 19:57:08 [info ] Starting new HTTP connection (1): 169.254.169.254
What I don't understand are all the Exception thrown from inside the logging library that are in visible in the std err output. Should the suggested config work in this scenario?
Attached are the source code file used, the log file from the WatchedFileHandler and console output file where the exceptions are visible. It was generated with: python issue.py &> console_output.txt
Hi,
Python 2.7.5
CentOS Linux release 7.2.1511 (Core)
I tried the suggestion named:
From:
http://www.structlog.org/en/stable/standard-library.html#rendering-using-structlog-based-formatters-within-logging
The only thing I added was:
(This issue is not related to the third party lib used, I got the same thing with other third party libs, just needed one as a minimal repro case.)
This leads to a ton of exception that ends with:
My goal is to use structlog to get all my logs and those from imported third party libs to be formatted in JSON with a basic set of common keys. But I started with using the documentation as is first to understand how it works.
I was expecting boto3 logs to be formatted and it worked, somewhere in the console output (and the log file) there is:
What I don't understand are all the Exception thrown from inside the logging library that are in visible in the std err output. Should the suggested config work in this scenario?
Attached are the source code file used, the log file from the WatchedFileHandler and console output file where the exceptions are visible. It was generated with:
python issue.py &> console_output.txt
console_output.txt
filehandler_output.txt
source_code.txt
Martin
The text was updated successfully, but these errors were encountered: