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

View file

@ -716,7 +716,7 @@ export namespace Server {
"json", "json",
z.object({ z.object({
service: z.string().openapi({ description: "Service name for the log entry" }), 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" }), message: z.string().openapi({ description: "Log message" }),
extra: z extra: z
.record(z.string(), z.any()) .record(z.string(), z.any())

View file

@ -4,7 +4,7 @@ import { Global } from "../global"
import z from "zod" import z from "zod"
export namespace Log { 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> export type Level = z.infer<typeof Level>
const levelPriority: Record<Level, number> = { const levelPriority: Record<Level, number> = {