Bunyan v0.17.0 Release Notes
-
🌲 [issue #33] Log rotation support:
var bunyan = require('bunyan'); var log = bunyan.createLogger({ name: 'myapp', streams: [{ type: 'rotating-file', path: '/var/log/myapp.log', count: 7, period: 'daily' }] });
🚤 Tweak to CLI default pretty output: don't special case "latency" field. The special casing was perhaps nice, but less self-explanatory. Before:
[2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (15ms, audit=true, bar=baz) GET /foo ...
After:
[2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (audit=true, bar=baz, latency=15) GET /foo ...
- Exit CLI on EPIPE, otherwise we sit there useless processing a huge log
file with, e.g.
bunyan huge.log | head
.