diff options
author | Alan Pearce | 2024-05-09 18:24:58 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-09 19:27:57 +0200 |
commit | 99d5507b223baa6c780707d32c7bbbb8611034f0 (patch) | |
tree | b982d873e7bd58ef9ad9544074d4475b5de27dfb /import | |
parent | 14c1ddaf7c5468c5966b0c1585f19a5ff39c206d (diff) | |
download | searchix-99d5507b223baa6c780707d32c7bbbb8611034f0.tar.lz searchix-99d5507b223baa6c780707d32c7bbbb8611034f0.tar.zst searchix-99d5507b223baa6c780707d32c7bbbb8611034f0.zip |
feat: allow configuration of log level
Diffstat (limited to 'import')
-rw-r--r-- | import/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/import/main.go b/import/main.go index b8ae633..87f8e4d 100644 --- a/import/main.go +++ b/import/main.go @@ -20,7 +20,8 @@ import ( const timeout = 30 * time.Minute type Config struct { - ConfigFile string `conf:"short:c"` + ConfigFile string `conf:"short:c"` + LogLevel slog.Level `conf:"default:INFO"` } func main() { @@ -36,6 +37,7 @@ func main() { } log.Panicf("parsing runtime configuration: %v", err) } + slog.SetLogLoggerLevel(runtimeConfig.LogLevel) cfg, err := config.GetConfig(runtimeConfig.ConfigFile) if err != nil { |