Правки

This commit is contained in:
2026-03-07 17:21:27 +03:00
parent e055a6a09e
commit 93e9f4c37e
7 changed files with 347 additions and 168 deletions

View File

@@ -3,7 +3,10 @@ from __future__ import annotations
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from datetime import datetime, timezone
from typing import Any, Protocol
from typing import Any, Literal, Protocol
TraceLevel = Literal["INFO", "WARNING", "ERROR"]
def utc_now() -> datetime:
@@ -44,7 +47,7 @@ class TraceLogMessage:
step: str
status: str
message: str
level: str
level: TraceLevel
event_time: datetime = field(default_factory=utc_now)
attrs: dict[str, Any] = field(default_factory=dict)