projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make logging_utils remove preexisting logging turds, fix a small bug.
[python_utils.git]
/
logging_utils.py
diff --git
a/logging_utils.py
b/logging_utils.py
index f7fac03cd913ef22106fbc25cea821e161e62187..ddea102d4b7d4a94ea98d87a5877d922431d8225 100644
(file)
--- 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,
cfg.add_argument(
'--logging_clear_preexisting_handlers',
action=argparse_utils.ActionNoYes,
- default=
Fals
e,
+ default=
Tru
e,
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 ' +
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:
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']:
logger.warning(msg)
logger.debug(f'Logging format specification is "{fmt}"')
if config.config['logging_debug_threads']: