From 142ab324b3c02be49358bb1a38d13b1e6b34d081 Mon Sep 17 00:00:00 2001 From: DJ O'Leary Date: Sun, 6 Sep 2026 23:53:18 +0200 Subject: refactor(config): set default log level to info --- src/config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/config') diff --git a/src/config/config.go b/src/config/config.go index 2e597a1..664bef3 100644 --- a/src/config/config.go +++ b/src/config/config.go @@ -74,9 +74,9 @@ func NewConfigFromEnv() (Config, error) { return Config{}, ErrMissingCardmarketApiBaseURL } - lvl := slog.LevelDebug + lvl := slog.LevelInfo appLogLevel := os.Getenv(AppLogLevel) - if lvlErr := lvl.UnmarshalText([]byte(appLogLevel)); lvlErr != nil { + if lvlErr := lvl.UnmarshalText([]byte(appLogLevel)); len(appLogLevel) > 0 && lvlErr != nil { return Config{}, errors.Join(errors.New("could not unmarshal "+AppLogLevel), lvlErr) } -- cgit v1.2.3