pinojs / pino

🌲 super fast, all natural json logger
http://getpino.io
MIT License
14.21k stars 875 forks source link

remove all fields except msg #753

Closed dcsan closed 4 years ago

dcsan commented 4 years ago

Is there a formatter that will just leave me with the content of my debug messages (eg the msg field)

currently I get so much metadata it pushes the content of the debug message to wrap around like this:

[2019-12-07T23:05:06.782Z]  INFO: smooch-middleware/11713 on dcboom.hsd1.ca.comcast.net: http (msg)

if nothing I can simply pipe output to, a hint on how to write and use such a very simple formatter would be appreciated! can I create an extra stream and pipe output through my formatter somehow to extract the fields I want before outputting and still use all the pino transports etc?

jsumners commented 4 years ago

It looks like you are using pino-pretty. Have you looked at the ignore option? https://github.com/pinojs/pino-pretty

jsumners commented 4 years ago

Closing this due to lack of response. However, log formatters in v6 should also make this possible.

dcsan commented 4 years ago

thanks! I switched to another project in the end so didn't get to follow further on this.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.