-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I copied the exact example from the README:
package main
import (
"errors"
"log/slog"
"os"
"github.com/phsym/console-slog"
)
func main() {
logger := slog.New(
console.NewHandler(os.Stderr, &console.HandlerOptions{Level: slog.LevelDebug}),
)
slog.SetDefault(logger)
slog.Info("Hello world!", "foo", "bar")
slog.Debug("Debug message")
slog.Warn("Warning message")
slog.Error("Error message", "err", errors.New("the error"))
logger = logger.With("foo", "bar").
WithGroup("the-group").
With("bar", "baz")
logger.Info("group info", "attr", "value")
}
and the Debug level log is output with red text as if it's an error.. it seems like attributes are always considered errors as well:
Metadata
Metadata
Assignees
Labels
No labels
