Quantcast
Viewing all articles
Browse latest Browse all 346

K6 - getting a pino-like logger JSON output

I’m trying to get to a pino like logger output.
the problem is that any setup I got results with stringifying the metadata into the message instead of embedding it into the log entry record.

Has anybody tried that before?

Image may be NSFW.
Clik here to view.
:thinking:

Image may be NSFW.
Clik here to view.
:point_right:
I’m getting convinced that if I do that I’ll have to create an extension for that, at least one that will write to stdout without the “envelope” that come with console.log…

Image may be NSFW.
Clik here to view.
:point_right:
Another direction I considered is a pipe-transformer/beautifier like pino-pretty that I can pipe the stdout of k6 into it will transform it - but if I --log-output json - I get it on stderr.
if I 2>&1 then I get everything together, including the banners and summary which I seem to miss how to configure - its always print in text, even if I --out json --log-output json.

I hope there’s some undocumented config that im missing… Image may be NSFW.
Clik here to view.
:slight_smile:
this could be great.

Any point in the rihgt direction will be appreciated Image may be NSFW.
Clik here to view.
:slight_smile:

Keep up the good work Image may be NSFW.
Clik here to view.
:pray:

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 346

Trending Articles