fix: send logging to stderr

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
pull/31191/head
Terry Howe 2 weeks ago
parent e3124e488f
commit 389646ffd1
No known key found for this signature in database

@ -64,7 +64,7 @@ func (h *DebugCheckHandler) WithGroup(name string) slog.Handler {
// NewLogger creates a new logger with dynamic debug checking // NewLogger creates a new logger with dynamic debug checking
func NewLogger(debugEnabled DebugEnabledFunc) *slog.Logger { func NewLogger(debugEnabled DebugEnabledFunc) *slog.Logger {
// Create base handler that removes timestamps // Create base handler that removes timestamps
baseHandler := slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{ baseHandler := slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
// Always use LevelDebug here to allow all messages through // Always use LevelDebug here to allow all messages through
// Our custom handler will do the filtering // Our custom handler will do the filtering
Level: slog.LevelDebug, Level: slog.LevelDebug,

Loading…
Cancel
Save