mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 15:57:14 +03:00
use gmtime as time formatter
This commit is contained in:
parent
f2e38afc39
commit
85f7bddef0
@ -46,6 +46,7 @@ from fnmatch import fnmatch
|
||||
# So that any warning about accessing a protected member is only in one place.
|
||||
from sys import _getframe as getframe
|
||||
from threading import get_native_id as thread_native_id
|
||||
from time import gmtime
|
||||
from traceback import print_exc
|
||||
from typing import TYPE_CHECKING, Tuple, cast
|
||||
|
||||
@ -91,6 +92,9 @@ logging.Logger.trace = lambda self, message, *args, **kwargs: self._log( # type
|
||||
**kwargs
|
||||
)
|
||||
|
||||
# make logging use UTC for times
|
||||
logging.Formatter.converter = gmtime
|
||||
|
||||
|
||||
def _trace_if(self: logging.Logger, condition: str, message: str, *args, **kwargs) -> None:
|
||||
if any(fnmatch(condition, p) for p in config_mod.trace_on):
|
||||
|
Loading…
x
Reference in New Issue
Block a user