Akshay Bhasin
Akshay Bhasin

Reputation: 611

Bunyan logger clean message before logging

I am using bunyan to log all sorts of informations, errors etc. There are a few times when the log message contains sensitive information that I don't want to log. Is there any way to filter the log message in the bunyan logger before actually logging?

Upvotes: 0

Views: 1028

Answers (1)

Tzvika Mordoch
Tzvika Mordoch

Reputation: 193

You can create a simple serializer that checks for that sensitive info and deletes it before the logging takes place.

https://github.com/trentm/node-bunyan#serializers

Upvotes: 1

Related Questions