all repos — searchix @ 94b21b286edff37496a2fe481963625ac01c30a1

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: more structured logging

Alan Pearce
commit

94b21b286edff37496a2fe481963625ac01c30a1

parent

f076b5bd6cb82edd99be50f3dbdd39bb9be2c44e

1 file changed, 6 insertions(+), 5 deletions(-)

changed files
M internal/config/structs.gointernal/config/structs.go
@@ -5,14 +5,15 @@ // keep config structs here so that lll ignores the long lines (go doesn't support multi-line struct tags)
import ( "fmt" - "log/slog" + + "go.uber.org/zap/zapcore" ) type Config struct { - DataPath string `comment:"Path to store index data."` - LogLevel slog.Level `comment:"How much information to log, one of 'debug', 'info', 'warn', 'error'."` - Web *Web `comment:"Settings for the web server"` - Importer *Importer `comment:"Settings for the import job"` + DataPath string `comment:"Path to store index data."` + LogLevel zapcore.Level `comment:"How much information to log, one of 'debug', 'info', 'warn', 'error', 'panic', 'fatal'."` + Web *Web `comment:"Settings for the web server"` + Importer *Importer `comment:"Settings for the import job"` } type Web struct {