mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
parent
f1ff604b4c
commit
c367b49703
2 changed files with 8 additions and 1 deletions
|
@ -78,6 +78,7 @@ def process_common_arguments(args: argparse.Namespace) -> bool:
|
||||||
slogconf.exc_info,
|
slogconf.exc_info,
|
||||||
slogconf.filter_exc,
|
slogconf.filter_exc,
|
||||||
slogconf.filter_nones,
|
slogconf.filter_nones,
|
||||||
|
slogconf.filter_taskname,
|
||||||
]
|
]
|
||||||
logger_factory = None
|
logger_factory = None
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# vim: se sw=2:
|
# vim: se sw=2:
|
||||||
# MIT licensed
|
# MIT licensed
|
||||||
# Copyright (c) 2018 lilydjwg <lilydjwg@gmail.com>, et al.
|
# Copyright (c) 2018-2020,2023-2024 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
@ -44,6 +44,12 @@ def filter_nones(logger, level, event):
|
||||||
del event['url']
|
del event['url']
|
||||||
return event
|
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):
|
def filter_exc(logger, level, event):
|
||||||
exc_info = event.get('exc_info')
|
exc_info = event.get('exc_info')
|
||||||
if not exc_info:
|
if not exc_info:
|
||||||
|
|
Loading…
Add table
Reference in a new issue