Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Winston Sentry integration severity level #18021

Unanswered
vlaem asked this question in Q&A
Discussion options

I have configured my winston logger to use the same levels as sentry, by using the levels option in the winston create.logger constructor.

However I noticed that the sentry winston integration sends fatal and trace as info, checking out the code I see there is a custom mapping

const WINSTON_LEVEL_TO_LOG_SEVERITY_LEVEL_MAP = { // npm silly: 'trace', // npm and syslog debug: 'debug', // npm verbose: 'debug', // npm http: 'debug', // npm and syslog info: 'info', // syslog notice: 'info', // npm warn: 'warn', // syslog warning: 'warn', // npm and syslog error: 'error', // syslog emerg: 'fatal', // syslog alert: 'fatal', // syslog crit: 'fatal', };

And that one is used to map from npm or syslogs to sentry levels.
Is there any way to change this so it can also handle passing fatal and trace directly (such as winston.log('trace',...)?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /