Bunyan

Latest version: v0.1.2

Safety actively analyzes 630094 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 14 of 18

0.11.2

- [issue 30] Robust handling of 'req' field without a 'headers' subfield
in `bunyan` CLI.
- [issue 31] Pull the TRACE, DEBUG, et al defines from `bunyan -c "..."`
filtering code. This was added in v0.11.1, but has a significant adverse
affect.

0.11.1

- **Bad release. The TRACE et al names are bleeding into the log records
when using '-c'.**
- Add defines for the (uppercase) log level names (TRACE, DEBUG, etc.) in
`bunyan -c "..."` filtering condition code. E.g.:

$ ... | bunyan -c 'level >= ERROR'

0.11.0

- [pull 29] Add -l/--level for level filtering, and -c/--condition for
arbitrary conditional filtering (by github.com/isaacs):

$ ... | bunyan -l error filter out log records below error
$ ... | bunyan -l 50 numeric value works too
$ ... | bunyan -c 'level===50' equiv with -c filtering
$ ... | bunyan -c 'pid===123' filter on any field
$ ... | bunyan -c 'pid===123' -c '_audit' multiple filters

0.10.0

- [pull 24] Support for gzip'ed log files in the bunyan CLI (by
github.com/mhart):

$ bunyan foo.log.gz
...

0.9.0

- [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(!).

0.8.0

- [pull 21] Bunyan loggers now re-emit `fs.createWriteStream` error events.
By github.com/EvanOxfeld. See "examples/handle-fs-error.js" and
"test/error-event.js" for details.

var log = new Logger({name: 'mylog', streams: [{path: FILENAME}]});
log.on('error', function (err, stream) {
// Handle error writing to or creating FILENAME.
});

- jsstyle'ing (via `make check`)

Page 14 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.