Skip to content

Use triple-beam symbols to access info object#91

Open
sampsonbryce wants to merge 1 commit intokenperkins:v2from
sampsonbryce:v2
Open

Use triple-beam symbols to access info object#91
sampsonbryce wants to merge 1 commit intokenperkins:v2from
sampsonbryce:v2

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