Node-bunyan: Customize the message field name

Created on 6 Nov 2015  路  7Comments  路  Source: trentm/node-bunyan

My application logs are sent to a SaaS that requires a message field (instead of msg).
Is there any way to customize this?
Thanks

needstriage Type-Improvement Component-Lib

Most helpful comment

I would love to see a way for all standard fields to be modified. Our log levels follow RFC 3164 so it's kind of annoying that we can't change those in bunyan. And like OP our logging system expects message not msg and those extra fields create a lot of noise in our logging system.

Would be nice if this could either be done in a stream or serializer, where the final log object could be cloned and modified right before output.

All 7 comments

+1

Same question. I would love to customize the output having msg to message mainly and maybe removing some "standard" field.

Thanks for the question and sorry for the delays. I'll be making a second pass through the issues to actually triage. Before then a note to myself: I vaguely recall an earlier question where I posed a custom bunyan stream that could effectively do this. TODO: find that again.

Sorry to bump this. I have the same issue of a SaaS that expect a message field instead of msg.
Is this possible somehow?

Thanks

same here. Anyone managed to solve this?

You could try pino

I would love to see a way for all standard fields to be modified. Our log levels follow RFC 3164 so it's kind of annoying that we can't change those in bunyan. And like OP our logging system expects message not msg and those extra fields create a lot of noise in our logging system.

Would be nice if this could either be done in a stream or serializer, where the final log object could be cloned and modified right before output.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

raybooysen picture raybooysen  路  3Comments

LeonFedotov picture LeonFedotov  路  7Comments

aleybovich picture aleybovich  路  11Comments

ORESoftware picture ORESoftware  路  3Comments

trentm picture trentm  路  11Comments