diff --git a/proxyd/cmd/proxyd/main.go b/proxyd/cmd/proxyd/main.go index 36e076726e96..2f7579a9c538 100644 --- a/proxyd/cmd/proxyd/main.go +++ b/proxyd/cmd/proxyd/main.go @@ -28,7 +28,7 @@ var ( func main() { // Set up logger with a default INFO level in case we fail to parse flags. // Otherwise the final critical log won't show what the parsing error was. - slog.SetDefault(slog.New(slog.NewJSONHandler( + log.SetDefault(log.NewLogger(slog.NewJSONHandler( os.Stdout, &slog.HandlerOptions{Level: slog.LevelInfo}))) log.Info("starting proxyd", "version", GitVersion, "commit", GitCommit, "date", GitDate) @@ -50,7 +50,7 @@ func main() { log.Warn("invalid server.log_level set: " + config.Server.LogLevel) } } - slog.SetDefault(slog.New(slog.NewJSONHandler( + log.SetDefault(log.NewLogger(slog.NewJSONHandler( os.Stdout, &slog.HandlerOptions{Level: logLevel}))) if config.Server.EnablePprof { diff --git a/proxyd/integration_tests/util_test.go b/proxyd/integration_tests/util_test.go index e2b1eb646006..36edce13ef78 100644 --- a/proxyd/integration_tests/util_test.go +++ b/proxyd/integration_tests/util_test.go @@ -186,6 +186,6 @@ func (h *ProxydWSClient) WriteControlMessage(msgType int, msg []byte) error { } func InitLogger() { - slog.SetDefault(slog.New( - log.NewTerminalHandlerWithLevel(os.Stdout, slog.LevelDebug, false))) + log.SetDefault(log.NewLogger(slog.NewJSONHandler( + os.Stdout, &slog.HandlerOptions{Level: slog.LevelDebug}))) }