master: Fix LogForwarder in case an own LogRecordFactory is used
Since Python 3.2 the log record factory can be changed by using `logging.setLogRecordFactory` [1]. Therefore use `logging.makeLogRecord` as recommended in the documentation: "LogRecord instances are created automatically by the Logger every time something is logged, and can be created manually via makeLogRecord() (for example, from a pickled event received over the wire)." [2] This fixes the test case `log_handler_test.LogRecordFactoryTest.test_logrecordfactory`. [1] https://docs.python.org/3/library/logging.html#logging.setLogRecordFactory [2] https://docs.python.org/3/library/logging.html#logrecord-objects Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>pull/1341/head
parent
dad28e8b4a
commit
24745183ed
Loading…
Reference in New Issue