diff options
| author | 2020-01-20 13:20:26 +0000 | |
|---|---|---|
| committer | 2020-01-20 13:20:26 +0000 | |
| commit | cb73507c5e972d1d62b09e63fceb18adc2bfea25 (patch) | |
| tree | ddb574aff2939bf3e0225de7e4786abab4cdef43 /src/Logging.py | |
| parent | don't overwrite `line` in MOTD formatting (diff) | |
| signature | ||
use a TimeSpec system to request milliseconds in utils.datetime
Diffstat (limited to 'src/Logging.py')
| -rw-r--r-- | src/Logging.py | 3 |
1 files changed, 2 insertions, 1 deletions
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]): |
