Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement an optional "simple" format #20

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nicokaiser
Copy link

This PR implements a format parameter that lets the user decide which format is being used. The default is json, so it works just like before.

The new simple format only logs the log message, like the "-o simple" parameter in the Bunyan CLI.

Fixes #14.



function formatRecord(rec, format) {
var skip = ['hostname', 'level', 'msg', 'name', 'pid', 'time', 'v'];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this variable do? Is it just for reference? If so, can it just be a comment then?

@nicokaiser
Copy link
Author

@printscreen Thanks for your feedback – I deleted the unused skip variable. And added support for component (child loggers in Bunyan).

@nicokaiser
Copy link
Author

Any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: use r.msg as message, rather than entire object
2 participants