From 99d5507b223baa6c780707d32c7bbbb8611034f0 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 9 May 2024 18:24:58 +0200 Subject: feat: allow configuration of log level --- internal/server/server.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'internal/server') diff --git a/internal/server/server.go b/internal/server/server.go index f15d011..1611a7a 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -36,14 +36,15 @@ var ( ) type Config struct { - Production bool `conf:"default:false"` - InDevServer bool `conf:"default:false"` - LiveReload bool `conf:"default:false,flag:live"` - Root string `conf:"default:website"` - ListenAddress string `conf:"default:localhost"` - Port string `conf:"default:3000,short:p"` - BaseURL cfg.URL `conf:"default:http://localhost:3000,short:b"` - ConfigFile string `conf:"short:c"` + Production bool `conf:"default:false"` + InDevServer bool `conf:"default:false"` + LiveReload bool `conf:"default:false,flag:live"` + Root string `conf:"default:website"` + ListenAddress string `conf:"default:localhost"` + Port string `conf:"default:3000,short:p"` + BaseURL cfg.URL `conf:"default:http://localhost:3000,short:b"` + ConfigFile string `conf:"short:c"` + LogLevel slog.Level `conf:"default:INFO"` } type HTTPError struct { -- cgit 1.4.1