You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The readme suggests that jettison/log provides structured JSON logging, but when I use both log.Info(ctx, "entering the example function", jettison.WithKeyValueString("key", "value"))
and log.Error(nil, err, jettison.WithKeyValueString("another_key", "another_value"))
neither prints the error to stdout as JSON. I also can't find configurable options to specify that the output JSON.
Below is an example of the output I receive when running jettison/example:
`I 15:59:02.085 g/l/j/e/serverclient/client.go:39: serverclient: Performing a hop to another server[ctx_key=ctx_value,ctx_key2=ctx_value2,ctx_key3=ctx_value3,hops=2]
I 15:59:02.086 g/l/j/e/serverclient/server.go:30: serverclient: Received a Hop request from a client[ctx_key=ctx_value,ctx_key2=ctx_value2,ctx_key3=ctx_value3]
I 15:59:02.086 g/l/j/e/serverclient/client.go:39: serverclient: Performing a hop to another server[ctx_key=ctx_value,ctx_key2=ctx_value2,ctx_key3=ctx_value3,hops=1]
I 15:59:02.086 g/l/j/e/serverclient/server.go:30: serverclient: Received a Hop request from a client[ctx_key=ctx_value,ctx_key2=ctx_value2,ctx_key3=ctx_value3]
E 15:59:02.086 example/example.go:33: serverclient: error hopping: serverclient: run out of hops[hops=1,hops=0]
example: []
example:
Hi
The readme suggests that jettison/log provides structured JSON logging, but when I use both
log.Info(ctx, "entering the example function", jettison.WithKeyValueString("key", "value"))
and
log.Error(nil, err, jettison.WithKeyValueString("another_key", "another_value"))
neither prints the error to stdout as JSON. I also can't find configurable options to specify that the output JSON.
Below is an example of the output I receive when running jettison/example:
`I 15:59:02.085 g/l/j/e/serverclient/client.go:39: serverclient: Performing a hop to another server[ctx_key=ctx_value,ctx_key2=ctx_value2,ctx_key3=ctx_value3,hops=2]
I 15:59:02.086 g/l/j/e/serverclient/server.go:30: serverclient: Received a Hop request from a client[ctx_key=ctx_value,ctx_key2=ctx_value2,ctx_key3=ctx_value3]
I 15:59:02.086 g/l/j/e/serverclient/client.go:39: serverclient: Performing a hop to another server[ctx_key=ctx_value,ctx_key2=ctx_value2,ctx_key3=ctx_value3,hops=1]
I 15:59:02.086 g/l/j/e/serverclient/server.go:30: serverclient: Received a Hop request from a client[ctx_key=ctx_value,ctx_key2=ctx_value2,ctx_key3=ctx_value3]
E 15:59:02.086 example/example.go:33: serverclient: error hopping: serverclient: run out of hops[hops=1,hops=0]
example: []
example:
example:
The text was updated successfully, but these errors were encountered: