Refactor startup/logging service wiring and related test/config updates

This commit is contained in:
2026-02-15 21:02:54 -08:00
parent c6ac962f7a
commit bec69d1b71
41 changed files with 722 additions and 281 deletions

View File

@@ -75,6 +75,9 @@ export const DEFAULT_CONFIG: ResolvedConfig = {
enabled: "auto",
port: 6677,
},
logging: {
level: "info",
},
texthooker: {
openBrowser: true,
},
@@ -276,6 +279,13 @@ export const RUNTIME_OPTION_REGISTRY: RuntimeOptionRegistryEntry[] = [
];
export const CONFIG_OPTION_REGISTRY: ConfigOptionRegistryEntry[] = [
{
path: "logging.level",
kind: "enum",
enumValues: ["debug", "info", "warn", "error"],
defaultValue: DEFAULT_CONFIG.logging.level,
description: "Minimum log level for runtime logging.",
},
{
path: "websocket.enabled",
kind: "enum",
@@ -460,6 +470,14 @@ export const CONFIG_TEMPLATE_SECTIONS: ConfigTemplateSection[] = [
],
key: "websocket",
},
{
title: "Logging",
description: [
"Controls logging verbosity.",
"Set to debug for full runtime diagnostics.",
],
key: "logging",
},
{
title: "AnkiConnect Integration",
description: ["Automatic Anki updates and media generation options."],