'make check'
This commit is contained in:
parent
7fb58aa5e4
commit
42e99323ee
5 changed files with 29 additions and 28 deletions
|
@ -8,7 +8,8 @@ Known issues:
|
||||||
|
|
||||||
## bunyan 0.23.1 (not yet released)
|
## bunyan 0.23.1 (not yet released)
|
||||||
|
|
||||||
- #97 Unref rotating-file timeout which was preventing processes from exiting
|
- [issue #97] Unref rotating-file timeout which was preventing processes from
|
||||||
|
exiting.
|
||||||
|
|
||||||
|
|
||||||
## bunyan 0.23.0
|
## bunyan 0.23.0
|
||||||
|
|
|
@ -64,13 +64,12 @@ var log2 = bunyan.createLogger({
|
||||||
type: 'raw',
|
type: 'raw',
|
||||||
stream: new SpecificLevelStream(
|
stream: new SpecificLevelStream(
|
||||||
['info'],
|
['info'],
|
||||||
fs.createWriteStream('specific-level-stream-http.log',
|
fs.createWriteStream('specific-level-streams-http.log',
|
||||||
{flags: 'a', encoding: 'utf8'}))
|
{flags: 'a', encoding: 'utf8'}))
|
||||||
}, {
|
}, {
|
||||||
level: 'warn',
|
level: 'warn',
|
||||||
path: 'specific-level-stream-http.err.log'
|
path: 'specific-level-streams-http.err.log'
|
||||||
}
|
} ]
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
log2.info('200 GET /blah');
|
log2.info('200 GET /blah');
|
||||||
|
|
|
@ -1017,7 +1017,7 @@ RotatingFileStream.prototype._setupNextRot = function () {
|
||||||
this.timeout = setTimeout(
|
this.timeout = setTimeout(
|
||||||
function () { self.rotate(); },
|
function () { self.rotate(); },
|
||||||
this.rotAt - Date.now());
|
this.rotAt - Date.now());
|
||||||
if (typeof this.timeout.unref === 'function') {
|
if (typeof (this.timeout.unref) === 'function') {
|
||||||
this.timeout.unref();
|
this.timeout.unref();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,8 @@ var tap4nodeunit = require('./tap4nodeunit.js');
|
||||||
var test = tap4nodeunit.test;
|
var test = tap4nodeunit.test;
|
||||||
|
|
||||||
test('log with rotating file stream will terminate gracefully', function (t) {
|
test('log with rotating file stream will terminate gracefully', function (t) {
|
||||||
exec('node ' +__dirname + '/process-exit.js', {timeout: 1000}, function(err, stdout, stderr) {
|
exec('node ' +__dirname + '/process-exit.js', {timeout: 1000},
|
||||||
|
function (err, stdout, stderr) {
|
||||||
t.ifError(err);
|
t.ifError(err);
|
||||||
t.equal(stdout, 'done\n');
|
t.equal(stdout, 'done\n');
|
||||||
t.equal(stderr, '');
|
t.equal(stderr, '');
|
||||||
|
|
Loading…
Reference in a new issue