- 
 
- 
  Notifications
 You must be signed in to change notification settings 
- Fork 1.7k
-
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',...)?
Beta Was this translation helpful? Give feedback.