Handler
Runs
Ns/Op
Allocs/Op
Bytes/Op
MB/Sec
chanchal/zaphandler
1,968,339
610.80
3
280
175.19
madkins/flash
1,296,170
924.70
7
704
304.96
madkins/replattr
1,000,000
1,151.00
8
712
246.71
madkins/sloggy
646,135
1,756.00
30
1,280
162.31
phsym/zeroslog
2,509,022
476.30
4
312
317.01
phuslu/slog
5,635,213
213.10
0
0
1,135.63
samber/slog-logrus
157,461
7,436.00
63
4,276
35.91
samber/slog-zap
1,643,460
735.10
5
592
145.55
samber/slog-zerolog
476,286
2,564.00
39
2,763
105.71
slog/JSONHandler
1,424,109
865.70
6
568
319.96
snqk/meld
1,363,777
990.90
6
568
279.55
svcrunner/jsonlog
4,799,905
260.40
0
0
330.23
veqryn/dedup/Append
1,000,000
1,090.00
12
848
254.05
veqryn/dedup/Ignore
1,000,000
1,109.00
12
848
249.68
veqryn/dedup/Increment
1,000,000
1,120.00
12
848
247.36
veqryn/dedup/Overwrite
1,000,000
1,115.00
12
848
248.42
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": "2025-02-16T01:36:56Z"
}
Phsym Zerolog
Log
{
"caller": "/home/runner/work/go-slog/go-slog/bench/tests/benchmarks.go:96",
"level": "info",
"message": "This is a message",
"time": "2025-02-16T01:38:24Z"
}
Samber Zap
Log
{
"caller": "tests/benchmarks.go:96",
"level": "info",
"msg": "This is a message",
"time": "2025-02-16T01:39:17Z"
}
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": "2025-02-16T01:39:50.73380189Z"
}