Change Level lvl := new(slog.LevelVar) lvl.Set(slog.LevelInfo) logger := slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{ Level: lvl, })) // later ... lvl.Set(slog.LevelDebug) Links Structured Logging with slog - The Go Programming Language