@@ -28,7 +28,7 @@ logProcessErrors({
2828 winstonLogger[level](error .stack )
2929 },
3030
31- level: { multipleResolves : ' debug' },
31+ level: { uncaughtException : ' debug' },
3232
3333 exitOn: [' uncaughtException' , ' unhandledRejection' ],
3434
@@ -75,16 +75,15 @@ defined or not).
7575#### level
7676
7777_ Type_ : ` object ` \
78- _ Default_ : ` { warning: 'warn', multipleResolves: 'info', default: 'error' } `
78+ _ Default_ : ` { warning: 'warn', default: 'error' } `
7979
8080Which log level to use.
8181
8282Object keys are the error names:
8383[ ` uncaughtException ` ] ( https://nodejs.org/api/process.html#process_event_uncaughtexception ) ,
8484[ ` warning ` ] ( https://nodejs.org/api/process.html#process_event_warning ) ,
8585[ ` unhandledRejection ` ] ( https://nodejs.org/api/process.html#process_event_unhandledrejection ) ,
86- [ ` rejectionHandled ` ] ( https://nodejs.org/api/process.html#process_event_rejectionhandled ) ,
87- [ ` multipleResolves ` ] ( https://nodejs.org/api/process.html#process_event_multipleresolves )
86+ [ ` rejectionHandled ` ] ( https://nodejs.org/api/process.html#process_event_rejectionhandled )
8887or ` default ` .
8988
9089Object values are the log level: ` 'debug' ` , ` 'info' ` , ` 'warn' ` , ` 'error' ` ,
@@ -96,8 +95,8 @@ import logProcessErrors from 'log-process-errors'
9695
9796logProcessErrors ({
9897 level: {
99- // Use `debug` log level for `multipleResolves ` instead of `info `
100- multipleResolves : ' debug' ,
98+ // Use `debug` log level for `uncaughtException ` instead of `error `
99+ uncaughtException : ' debug' ,
101100
102101 // Skip some logs based on a condition
103102 default (error ) {
@@ -112,8 +111,7 @@ logProcessErrors({
112111_ Type_ : ` string[] ` \
113112_ Value_ : array of [ ` 'uncaughtException' ` ] ( https://nodejs.org/api/process.html#process_event_uncaughtexception ) ,
114113[ ` 'unhandledRejection' ` ] ( https://nodejs.org/api/process.html#process_event_unhandledrejection ) ,
115- [ ` 'rejectionHandled' ` ] ( https://nodejs.org/api/process.html#process_event_rejectionhandled ) ,
116- [ ` 'multipleResolves' ` ] ( https://nodejs.org/api/process.html#process_event_multipleresolves )
114+ [ ` 'rejectionHandled' ` ] ( https://nodejs.org/api/process.html#process_event_rejectionhandled )
117115or [ ` 'warning' ` ] ( https://nodejs.org/api/process.html#process_event_warning ) \
118116_ Default_ : ` ['uncaughtException', 'unhandledRejection'] ` for Node ` >= 15.0.0 ` ,
119117` ['uncaughtException'] ` otherwise.
@@ -209,8 +207,7 @@ available as a third argument to [`log`](#log).
209207_ Type_ : ` string ` \
210208_ Value_ : [ ` 'UncaughtException' ` ] ( https://nodejs.org/api/process.html#process_event_uncaughtexception ) ,
211209[ ` 'UnhandledRejection' ` ] ( https://nodejs.org/api/process.html#process_event_unhandledrejection ) ,
212- [ ` 'RejectionHandled' ` ] ( https://nodejs.org/api/process.html#process_event_rejectionhandled ) ,
213- [ ` 'MultipleResolves' ` ] ( https://nodejs.org/api/process.html#process_event_multipleresolves )
210+ [ ` 'RejectionHandled' ` ] ( https://nodejs.org/api/process.html#process_event_rejectionhandled )
214211or [ ` 'Warning' ` ] ( https://nodejs.org/api/process.html#process_event_warning )
215212
216213#### error.stack
0 commit comments