Closed frankthelen closed 6 years ago
Check the good-console docs. That's what formats the timestamp before sending it to 'stdout'.
Thanks for your quick answer. If I understand correctly, good-console
doesn't play together with good-squeeze/SafeJson
, right. So, if I want to have a JSON-formatted log output with its timestamp
ISO-formatted, it doesn't seam to work. Or am I doing something wrong. Thanks.
Sorry, I misread your configuration! You aren't using good-console.
The reporting pipeline you have configured will just take the values from the "log", "request", "response" and "error" events, censor out "password" if it's there, JSONify it and then pipe it to stdout.
If you want to do some additional formatting, you'll need to have some kind of transformation stream in there to morph the timestamp to a different format. Probably after "white-out" and before "SafeJson" as the log values are still objects at that point in the pipeline.
Yep. Unfortunately, I didn't find a package that works for me. Anyway, I decided to have some fun and write my own transform stream. Maybe it's also interesting for others. Here it is: https://www.npmjs.com/package/good-map
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
Hi!
I have a question (can't find anything it the docs): Is there a way to change the
timestamp
date format to ISO.I am using this reporter configuration with Good 8.0.0-rc1.
Which outputs timestamp in milliseconds like this:
Thanks.