This commit is contained in:
Dax Raad
2025-07-23 23:44:24 -04:00
parent fb59b64b96
commit 6357869e81
2 changed files with 2 additions and 2 deletions

View File

@@ -716,7 +716,7 @@ export namespace Server {
"json",
z.object({
service: z.string().openapi({ description: "Service name for the log entry" }),
level: z.enum(["debug", "info", "error", "warn"]).openapi({ description: "Log level" }),
level: z.enum(["debug", "info", "error", "warn"]).openapi({ description: "Log level", ref: "LogLevel" }),
message: z.string().openapi({ description: "Log message" }),
extra: z
.record(z.string(), z.any())

View File

@@ -4,7 +4,7 @@ import { Global } from "../global"
import z from "zod"
export namespace Log {
export const Level = z.enum(["DEBUG", "INFO", "WARN", "ERROR"]).openapi({ ref: "LogLevel", description: "Log level" })
export const Level = z.enum(["DEBUG", "INFO", "WARN", "ERROR"])
export type Level = z.infer<typeof Level>
const levelPriority: Record<Level, number> = {