- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestNewLogLogger (0.1 sec)
-
src/log/slog/logger_test.go
buf.Reset() // use local var 'args' to defeat vet check args := []any{"err", io.EOF, "a"} l.Error("msg", args...) checkLogOutput(t, buf.String(), `level=ERROR msg=msg err=EOF !BADKEY=a`) } func TestNewLogLogger(t *testing.T) { var buf bytes.Buffer h := NewTextHandler(&buf, nil) ll := NewLogLogger(h, LevelWarn) ll.Print("hello") checkLogOutput(t, buf.String(), "time="+textTimeRE+` level=WARN msg=hello`) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 10 21:25:30 UTC 2023 - 19.5K bytes - Viewed (0)