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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user