add: SQLite-backed structured logging with retention

Replace JSON/file logging with a logs.db (WAL) store. Thread the logger
through the encoder and metadata client for debug instrumentation of every
ffmpeg/ffprobe/opusenc invocation and OMDb/TVmaze request. API keys are
redacted before request URLs are logged. Retention defaults to 7 days,
overridable via log_retention_days in config.
This commit is contained in:
Esa Kataja
2026-06-21 17:08:23 +03:00
parent 6a564aabb2
commit f39f5b1b16
8 changed files with 221 additions and 134 deletions
+3
View File
@@ -76,6 +76,9 @@ func Load(configPath string) (*types.Config, error) {
if cfg.Encoding.TVRip.Preset == 0 {
cfg.Encoding.TVRip.Preset = 2
}
if cfg.LogRetentionDays == 0 {
cfg.LogRetentionDays = 7
}
return &cfg, nil
}