MCPcopy Create free account
hub / github.com/coder/slog / Error

Function Error

sloggers/slogtest/t.go:166–169  ·  view source on GitHub ↗

Error logs the given msg and fields to t via t.Error at the error level.

(t testing.TB, msg string, fields ...slog.Field)

Source from the content-addressed store, hash-verified

164
165// Error logs the given msg and fields to t via t.Error at the error level.
166func Error(t testing.TB, msg string, fields ...slog.Field) {
167 slog.Helper()
168 l(t).Error(ctx, msg, fields...)
169}
170
171// Fatal logs the given msg and fields to t via t.Fatal at the fatal level.
172func Fatal(t testing.TB, msg string, fields ...slog.Field) {

Callers 1

TestStatelessFunction · 0.92

Calls 3

lFunction · 0.85
HelperMethod · 0.45
ErrorMethod · 0.45

Tested by 1

TestStatelessFunction · 0.74