@vrbo/pino-rotating-file
Advanced tools
Changelog
[4.0.0] Breaking change
Changelog
3.0.0 (2021-02-25)
JSON.stringify
if the isJson
option is false
. This affects output in the following way:Previously, when logging entries run through pino-pretty
, the output is wrapped in double-quotes on each line:
"[2021-02-23 22:10:29.888 +0000] INFO (myLabel): my log {"
" req: {"
" url: '/'"
" }"
"[2021-02-23 22:10:29.999 +0000] ERROR (myLabel): TypeError: my error log"
" at line 42"
...
Which would then require additional configurations for Splunk indexers to correctly parse the log.
Preferably in this case, it would just log the output as-is, without calling JSON.stringify()
on it, like it is now.
These changes wrap the call to the output stream in a similar check for isJson === false
that is happening in other use-cases, so that the raw data
value will get passed directly to the destination stream, rather than first calling ${JSON.stringify(data)}\n
.