Update public source

This commit is contained in:
2026-10-11 08:02:54 +03:00
parent 18463d2c8b
commit 18837b2a08
5 changed files with 58 additions and 40 deletions
+3 -8
View File
@@ -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",
)
)