Handler
Runs
Ns/Op
Allocs/Op
Bytes/Op
MB/Sec
chanchal/zaphandler
2,001,231
620.40
3
280
172.47
madkins/flash
1,264,652
941.90
7
704
301.51
madkins/replattr
1,000,000
1,156.00
8
712
245.76
madkins/sloggy
680,320
1,708.00
30
1,280
166.87
phsym/zeroslog
2,457,451
494.10
4
312
305.63
phuslu/slog
5,423,780
224.10
0
0
1,236.32
samber/slog-logrus
160,810
7,451.00
59
3,940
35.84
samber/slog-zap
1,673,392
714.50
5
592
149.76
samber/slog-zerolog
516,952
2,308.00
34
2,378
117.43
slog/JSONHandler
1,426,246
833.00
6
568
332.51
svcrunner/jsonlog
4,461,201
276.60
0
0
314.58
Implied
SourceCaller
Doc
Some handlers return source data as a single string on the caller
field
in the format <file>:<line>
where <file>
and <line>
correspond
to the File
and Line
fields of the source data group and Function
is not provided.
Chanchal Zap
Log
{
"caller": "tests/benchmarks.go:96",
"level": "info",
"msg": "This is a message",
"time": "2024-05-19T01:12:04Z"
}
Phsym Zerolog
Log
{
"caller": "/home/runner/work/go-slog/go-slog/bench/tests/benchmarks.go:96",
"level": "info",
"message": "This is a message",
"time": "2024-05-19T01:13:30Z"
}
Samber Zap
Log
{
"caller": "tests/benchmarks.go:96",
"level": "info",
"msg": "This is a message",
"time": "2024-05-19T01:14:25Z"
}
SourceKey
Doc
Handlers should log source data when the slog.HandlerOptions.AddSource
flag is set.
Svcrunner Jsonlog
Log
{
"level": "INFO",
"message": "This is a message",
"time": "2024-05-19T01:14:58.867907855Z"
}