Home

Handler svcrunner/jsonlog

Handlers
Bench Tests
Verify Tests
Summary Links

svcrunner/jsonlog.

svcrunner/jsonlog

Benchmark Data

Benchmark Runs Ns/Op Allocs/Op Bytes/Op MB/Sec
Attributes 1,000,000 1,059.00 3 280 392.75
Big Group 34,441 35,892.00 14 56,137 293.63
Disabled 404,765,176 2.97 0 0 0.00
Key Values 1,000,000 1,089.00 3 280 382.01
Logging 59,827 20,482.00 0 0 439.46
Simple 4,827,558 242.30 0 0 359.02
Simple Source 4,799,905 260.40 0 0 330.23
With Attrs Attributes 1,000,000 1,085.00 4 288 715.87
With Attrs Key Values 1,000,000 1,118.00 4 288 695.00
With Attrs Simple 3,873,990 339.10 1 8 1,320.96
With Group Attributes 1,000,000 1,076.00 4 296 399.67
With Group Key Values 1,000,000 1,114.00 4 296 385.85

Check box to see charts

Warnings

Required
LevelVar Unable to change level during execution via LevelVar
Verify: Level Var

level not changed

SlogTest Failure of embedded slog/slogtest
Verify: Slog Test

missing key "msg"
this test expects slog.TimeKey, slog.LevelKey and slog.MessageKey

missing key "msg"
a Handler should handle the WithGroup method

missing key "msg"
a Handler should handle multiple WithGroup and WithAttr calls

missing key "msg"
a Handler should not output groups if there are no attributes

Implied
MessageKey Wrong message key (should be 'msg')
Verify: Canceled Context

`message`

Verify: Canceled Context

`message`

Verify: Canceled Context

`message`

Verify: Keys

`message`

Verify: Source Key

`message`

Verify: Zero PC

`message`

Verify: Zero Time

`message`

NoReplAttr HandlerOptions.ReplaceAttr not available
Verify: Replace Attr

too many attributes: 6, alpha == beta, change still exists, remove still exists

Verify: Replace Attr Basic

time field still exists

message field still exists

source ==

Verify: Replace Attr Fn Change Key

too few attributes: 3

no message key

message not string

Verify: Replace Attr Fn Level Case

level value not null

Verify: Replace Attr Fn Multi

Verify: Replace Attr Fn Remove Empty Key

Verify: Replace Attr Fn Remove Time

time value not empty string

SourceKey Source data not logged when AddSource flag set
Bench: Simple Source

no 'source' key

Verify: Source Key

no 'source' key

Suggested
Duplicates Duplicate field(s) found
Verify: Attribute Duplicate

map[alpha:2 charlie:3]

Verify: Attribute With Duplicate

map[alpha:2 charlie:3]

DurationString slog.Duration() logs a string representation instead of nanoseconds
Verify: Group Duration

8h3m22s

Verify: Log Attributes

1m0s

NoEmptyName Attributes with empty names are not logged
Verify: Attribute Empty Name

Verify: Attribute With Empty Name

Verify: Attributes Not Empty

Verify: Attributes With Not Empty