MCPcopy Index your code
hub / github.com/coder/slog / Error

Method Error

slog.go:100–103  ·  view source on GitHub ↗

Error logs the msg and fields at LevelError. It will then Sync().

(ctx context.Context, msg string, fields ...Field)

Source from the content-addressed store, hash-verified

98//
99// It will then Sync().
100func (l Logger) Error(ctx context.Context, msg string, fields ...Field) {
101 l.log(ctx, LevelError, msg, fields)
102 l.Sync()
103}
104
105// Critical logs the msg and fields at LevelCritical.
106//

Callers 7

TestMapFunction · 0.45
TestLoggerFunction · 0.45
ExampleFunction · 0.45
Example_multipleFunction · 0.45
TestExitFunction · 0.45
FmtMethod · 0.45

Calls 2

logMethod · 0.95
SyncMethod · 0.95

Tested by 6

TestMapFunction · 0.36
TestLoggerFunction · 0.36
ExampleFunction · 0.36
Example_multipleFunction · 0.36
TestExitFunction · 0.36