diff --git a/nvchecker/core.py b/nvchecker/core.py index 033b304..d7097c3 100644 --- a/nvchecker/core.py +++ b/nvchecker/core.py @@ -78,6 +78,7 @@ def process_common_arguments(args: argparse.Namespace) -> bool: slogconf.exc_info, slogconf.filter_exc, slogconf.filter_nones, + slogconf.filter_taskname, ] logger_factory = None diff --git a/nvchecker/slogconf.py b/nvchecker/slogconf.py index 68f7166..b6a6afa 100644 --- a/nvchecker/slogconf.py +++ b/nvchecker/slogconf.py @@ -1,6 +1,6 @@ # vim: se sw=2: # MIT licensed -# Copyright (c) 2018 lilydjwg , et al. +# Copyright (c) 2018-2020,2023-2024 lilydjwg , et al. import logging import os @@ -44,6 +44,12 @@ def filter_nones(logger, level, event): del event['url'] return event +def filter_taskname(logger, level, event): + # added in Python 3.12, not useful to us, but appears as a normal KV. + if 'taskName' in event: + del event['taskName'] + return event + def filter_exc(logger, level, event): exc_info = event.get('exc_info') if not exc_info: