refactor(logging): add subsystem console formatting

This commit is contained in:
Peter Steinberger
2025-12-21 13:23:42 +00:00
parent bcd3c13e2c
commit 5b2e7d4464
6 changed files with 303 additions and 2 deletions

View File

@@ -20,6 +20,15 @@ export type SessionConfig = {
export type LoggingConfig = {
level?: "silent" | "fatal" | "error" | "warn" | "info" | "debug" | "trace";
file?: string;
consoleLevel?:
| "silent"
| "fatal"
| "error"
| "warn"
| "info"
| "debug"
| "trace";
consoleStyle?: "pretty" | "compact" | "json";
};
export type WebReconnectConfig = {
@@ -246,6 +255,20 @@ const ClawdisSchema = z.object({
])
.optional(),
file: z.string().optional(),
consoleLevel: z
.union([
z.literal("silent"),
z.literal("fatal"),
z.literal("error"),
z.literal("warn"),
z.literal("info"),
z.literal("debug"),
z.literal("trace"),
])
.optional(),
consoleStyle: z
.union([z.literal("pretty"), z.literal("compact"), z.literal("json")])
.optional(),
})
.optional(),
browser: z