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

Added a formatter option #2

Closed
wants to merge 2 commits into from

Conversation

dhendo
Copy link

@dhendo dhendo commented Nov 3, 2011

Added a formatter option to allow the shape of the MongoDB log entry to be changed.

options.formatter = function(level, msg, meta) {
    return {
        datetime: new Date(),
        message: msg,
        tag: meta.tag
    };
}

This allows you to re-arrange and pull items out of the meta object to better fit your schema (handy if you have log entries coming in from elsewhere)

@indexzero
Copy link
Member

This will be resolved in a future version of winston and should not be addressed in a single transport.

@indexzero indexzero closed this May 11, 2012
@bitmage bitmage mentioned this pull request Dec 20, 2012
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.

2 participants