Skip to content

Commit 1eaf690

Browse files
committed
emit seriousError evt on app
1 parent 72d6550 commit 1eaf690

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/production.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var productionLogging = function (err, req) {
3232
errMsgArray = printErr(err, req);
3333

3434
// trigger app exit routine
35-
appErrorHandler && this.app.emit('killApp');
35+
appErrorHandler && this.app.emit('seriousError');
3636

3737
return errMsgArray;
3838
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "log-errors",
3-
"version": "3.2.0",
3+
"version": "3.3.0",
44
"description": "environment aware error logger that can easily be plugged into express.js",
55
"main": "index.js",
66
"scripts": {

test/production.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ test('production logger only logs error levels of 3 (error) and above', function
1414
var baseError = new Error('msg');
1515

1616
this.app = new eventEmitter();
17-
this.app.on('killApp', function() {
18-
t.ok(this.app._events.killApp, 'app event being emitted');
17+
this.app.on('seriousError', function() {
18+
t.ok(this.app._events.seriousError, 'app event being emitted');
1919
}.bind(this));
2020

2121
// minor errors are NOT logged

0 commit comments

Comments
 (0)