Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use LogRecord.getMessage to get OLTP body
This improves compatibility with logging libraries that use `logging.setLogRecordFactory()` or patching to customize the message formatting of the created `LogRecord`s. It does this by using the processed `LogRecord`'s `getMessage()` method to get the body text instead of using `record.msg % record.args`. Also adds "getMessage" to the list of reserved attributes so if the customization is done by patching the `getMessage` function on the `LogRecord` directly (instead of using a subclass), it's not accidentally treated as an attribute.
- Loading branch information