mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-18 02:52:42 +03:00
use gmtime as time formatter
This commit is contained in:
1 file changed
+4
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user