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

Use triple-beam symbols to access info object #91

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

sampsonbryce
Copy link

Winston uses the triple-beam to provide symbols for accessing the info object. By accessing the level and message using the string key (via object destructuring) instead of using the symbols, winston-papertrail was not getting the correct value.

Example: If you define a formatter using the winston.createLogger format option it will store the formatted message on the info object with the key being the MESSAGE symbol from triple-beam not the string 'message'. Therefore when winston-papertrail went to access the message it received the unformatted message.

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.

1 participant