diff options
| author | Scott <[email protected]> | 2022-01-17 15:51:44 -0800 |
|---|---|---|
| committer | Scott <[email protected]> | 2022-01-17 15:51:44 -0800 |
| commit | 2c43e31aae1138f79c30619cde25746e41390152 (patch) | |
| tree | 4083a2b2d38102400a8d6d232b3ba2130aee1c43 | |
| parent | 21562149bda41588b65e4553d216fd0103761811 (diff) | |
Make logging_utils remove preexisting logging turds, fix a small bug.
| -rw-r--r-- | logging_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/logging_utils.py b/logging_utils.py index f7fac03..ddea102 100644 --- a/logging_utils.py +++ b/logging_utils.py @@ -146,7 +146,7 @@ cfg.add_argument( cfg.add_argument( '--logging_clear_preexisting_handlers', action=argparse_utils.ActionNoYes, - default=False, + default=True, help=( 'Should logging code clear preexisting global logging handlers and thus insist that is ' + 'alone can add handlers. Use this to work around annoying modules that insert global ' + @@ -523,7 +523,7 @@ def initialize_logging(logger=None) -> logging.Logger: f'Initialized global logging; default logging level is {level_name}.' ) if config.config['logging_clear_preexisting_handlers'] and preexisting_handlers_count > 0: - msg = 'Logging cleared {preexisting_handlers_count} global handlers (--logging_clear_preexisting_handlers)' + msg = f'Logging cleared {preexisting_handlers_count} global handlers (--logging_clear_preexisting_handlers)' logger.warning(msg) logger.debug(f'Logging format specification is "{fmt}"') if config.config['logging_debug_threads']: |
