Update public source
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from datetime import datetime, timezone
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@@ -9,12 +9,7 @@ LOGGER_NAME = "cracklab.client"
|
||||
|
||||
|
||||
class UTCFormatter(logging.Formatter):
|
||||
converter = staticmethod(
|
||||
lambda timestamp: datetime.fromtimestamp(
|
||||
timestamp,
|
||||
tz=timezone.utc,
|
||||
).timetuple()
|
||||
)
|
||||
converter = staticmethod(time.gmtime)
|
||||
|
||||
|
||||
def _configure(
|
||||
@@ -37,7 +32,7 @@ def _configure(
|
||||
)
|
||||
handler.setFormatter(
|
||||
UTCFormatter(
|
||||
"%(asctime)sZ %(levelname)s %(message)s",
|
||||
"%(asctime)s.%(msecs)03dZ [%(levelname)s] %(name)s: %(message)s",
|
||||
datefmt="%Y-%m-%dT%H:%M:%S",
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user