mirror of
https://github.com/lilydjwg/nvchecker
synced 2024-12-17 20:24:47 +00:00
parent
f1ff604b4c
commit
c367b49703
@ -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
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# vim: se sw=2:
|
||||
# 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 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:
|
||||
|
Loading…
Reference in New Issue
Block a user