diff --git a/discord-bot/cmd/bot/main.go b/discord-bot/cmd/bot/main.go index 56a48fd..e399d64 100644 --- a/discord-bot/cmd/bot/main.go +++ b/discord-bot/cmd/bot/main.go @@ -2,6 +2,7 @@ package main import ( "context" + "log/slog" "os" "os/signal" "syscall" @@ -31,6 +32,9 @@ func main() { } log := logger.New(cfg.LogFormat, cfg.LogLevel) + // Set the process-wide default so contexts created at library boundaries + // still inherit the configured JSON/text handler. + slog.SetDefault(log) log.Info("starting discord-bot", "version", version, "ha_gateway_addr", cfg.HAGatewayAddr,