temp push

This commit is contained in:
2025-12-01 13:40:58 +01:00
parent aac6db39c2
commit 4a668493c4
11 changed files with 559 additions and 116 deletions

View File

@@ -23,7 +23,7 @@ func New(id string, cfg config.LogConfig) (*slog.Logger, func() error, error) {
cfg.Rotation = 7
}
console := slog.NewTextHandler(&prefixWriter{inner: os.Stderr, prefix: []byte("[" + id + "] "), startLine: true}, &slog.HandlerOptions{AddSource: true})
console := slog.NewTextHandler(&prefixWriter{inner: os.Stderr, prefix: []byte("[" + id + "] "), startLine: true}, &slog.HandlerOptions{AddSource: true, Level: cfg.Level})
router := newFileRouter(cfg.Directory, cfg.Rotation, id)
root := slogmulti.Fanout(console, router)