'make check'

master
Trent Mick 2014-05-31 22:25:06 -07:00
parent 7fb58aa5e4
commit 42e99323ee
5 changed files with 29 additions and 28 deletions

View File

@ -8,7 +8,8 @@ Known issues:
## 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

View File

@ -64,13 +64,12 @@ var log2 = bunyan.createLogger({
type: 'raw',
stream: new SpecificLevelStream(
['info'],
fs.createWriteStream('specific-level-stream-http.log',
fs.createWriteStream('specific-level-streams-http.log',
{flags: 'a', encoding: 'utf8'}))
}, {
level: 'warn',
path: 'specific-level-stream-http.err.log'
}
]
path: 'specific-level-streams-http.err.log'
} ]
});
log2.info('200 GET /blah');

View File

@ -1017,7 +1017,7 @@ RotatingFileStream.prototype._setupNextRot = function () {
this.timeout = setTimeout(
function () { self.rotate(); },
this.rotAt - Date.now());
if (typeof this.timeout.unref === 'function') {
if (typeof (this.timeout.unref) === 'function') {
this.timeout.unref();
}
}

View File

@ -12,7 +12,8 @@ var tap4nodeunit = require('./tap4nodeunit.js');
var test = tap4nodeunit.test;
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.equal(stdout, 'done\n');
t.equal(stderr, '');