- [pull 16] Bullet proof the `bunyan.stdSerializers` (by github.com/rlidwka).
- [pull 15] The `bunyan` CLI will now chronologically merge multiple log
streams when it is given multiple file arguments. (by github.com/davepacheco)
$ bunyan foo.log bar.log
... merged log records ...
- [pull 15] A new `bunyan.RingBuffer` stream class that is useful for
keeping the last N log messages in memory. This can be a fast way to keep
recent, and thus hopefully relevant, log messages. (by dapsays,
github.com/davepacheco)
Potential uses: Live debugging if a running process could inspect those
messages. One could dump recent log messages at a finer log level than is
typically logged on
[`uncaughtException`](http://nodejs.org/docs/latest/api/all.htmlall_event_uncaughtexception).
var ringbuffer = new bunyan.RingBuffer({ limit: 100 });
var log = new bunyan({
name: 'foo',
streams: [{
type: 'raw',
stream: ringbuffer,
level: 'debug'
}]
});
log.info('hello world');
console.log(ringbuffer.records);
- Add support for "raw" streams. This is a logging stream that is given
raw log record objects instead of a JSON-stringified string.
function Collector() {
this.records = [];
}
Collector.prototype.write = function (rec) {
this.records.push(rec);
}
var log = new Logger({
name: 'mylog',
streams: [{
type: 'raw',
stream: new Collector()
}]
});
See "examples/raw-stream.js". I expect raw streams to be useful for
piping Bunyan logging to separate services (e.g. <http://www.loggly.com/>,
<https://github.com/etsy/statsd>) or to separate in-process handling.
- Add test/corpus/*.log files (accidentally excluded) so the test suite
actually works(!).