How to use bunyan logging for 3rd-party libraries?

164 views Asked by At

I'm using bunyan to send logs to Google Cloud Logger. Regular logs are not show up there. Or they do show up but as one-liners. If a regular consonle.log will be logging an object, then each property of this object will be displayed as a separated line, which is really hard to read.

The bunyan let me output only the title as the log for Google Cloud Logger and if I pass an object, then this object will be displayed as the log payload, which is good and easy to read.

I'm using a 3rd party npm package. It outputs it's own console.logs. How do I make bunyan to intercept those logs?

0

There are 0 answers