Various clean-ups to the logging context code (#8935)

This commit is contained in:
Patrick Cloke 2020-12-14 14:19:47 -05:00 committed by GitHub
parent 895e04319b
commit 1619802228
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 20 additions and 39 deletions

View file

@ -206,7 +206,7 @@ def _setup_stdlib_logging(config, log_config_path, logBeginner: LogBeginner) ->
# filter options, but care must when using e.g. MemoryHandler to buffer
# writes.
log_context_filter = LoggingContextFilter(request="")
log_context_filter = LoggingContextFilter()
log_metadata_filter = MetadataFilter({"server_name": config.server_name})
old_factory = logging.getLogRecordFactory()