Поставил HTML по дефолту

This commit is contained in:
2026-05-02 23:41:14 +03:00
parent 3184ff16ca
commit 2e75e53b89
4 changed files with 32 additions and 7 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ TraceResponseFormat = Literal["json", "text", "html"]
class TraceQueryRequest:
levels: tuple[TraceLevel, ...] = ("ERROR", "WARNING", "INFO")
include_attrs_json: bool = False
response_format: TraceResponseFormat = "text"
response_format: TraceResponseFormat = "html"
TraceLookupHandler = Callable[[str, TraceQueryRequest], Awaitable[TraceLogView]]
+1 -1
View File
@@ -14,7 +14,7 @@ from app_runtime.contracts.trace import TraceLevel, TraceLogRecord, TraceLogView
class TraceRequestParser:
def parse(self, request: Request) -> TraceQueryRequest:
raw_levels = request.query_params.get("levels")
raw_format = request.query_params.get("format", "text")
raw_format = request.query_params.get("format", "html")
response_format = raw_format.strip().lower()
if response_format not in {"json", "text", "html"}:
raise ValueError(f"unsupported trace format: {raw_format}")