From cb73507c5e972d1d62b09e63fceb18adc2bfea25 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 20 Jan 2020 13:20:26 +0000 Subject: use a TimeSpec system to request milliseconds in utils.datetime --- src/Logging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Logging.py') diff --git a/src/Logging.py b/src/Logging.py index 61b90402..0f636587 100644 --- a/src/Logging.py +++ b/src/Logging.py @@ -13,7 +13,8 @@ LEVELS = { class BitBotFormatter(logging.Formatter): def formatTime(self, record, datefmt=None): datetime_obj = datetime.datetime.fromtimestamp(record.created) - return utils.datetime.iso8601_format(datetime_obj, milliseconds=True) + return utils.datetime.iso8601_format(datetime_obj, + timespec=utils.datetime.TimeSpec.MILLISECOND) class HookedHandler(logging.StreamHandler): def __init__(self, func: typing.Callable[[int, str], None]): -- cgit v1.3.1-10-gc9f91