Skip to content

Commit

Permalink
test: multiFile appenders' shutdown called before use
Browse files Browse the repository at this point in the history
  • Loading branch information
so5 committed Oct 2, 2018
1 parent 2a336d9 commit f066f19
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/tap/multi-file-appender-test.js
Expand Up @@ -162,5 +162,24 @@ test('multiFile appender', (batch) => {
});
});

batch.test('should shutdown safely even if it is not used', (t) => {
log4js.configure({
appenders: {
out: { type: 'stdout' },
test: {
type: 'multiFile', base: 'logs/', property: 'categoryName', extension: '.log'
}
},
categories: {
default: { appenders: ['out'], level: 'info' },
test: { appenders: ['test'], level: 'debug' }
}
});
log4js.shutdown(() => {
t.ok('callback is called');
t.end();
});
});

batch.end();
});

0 comments on commit f066f19

Please sign in to comment.