Changelog
bunyan 1.0.1
[issues #105, #138, #151] Export <Logger>.addStream(...)
and
<Logger>.addSerializers(...)
to be able to add them after Logger creation.
Thanks @andreineculau!
[issue #159] Fix bad handling in construtor guard intending to allow
creation without "new": var log = Logger(...)
. Thanks @rmg!
[issue #156] Smaller install size via .npmignore file.
[issue #126, #161] Ignore SIGINT (Ctrl+C) when processing stdin. ...| bunyan
should expect the preceding process in the pipeline to handle SIGINT. While
it is doing so, bunyan
should continue to process any remaining output.
Thanks @timborodin and @jnordberg!
[issue #160] Stop using ANSI 'grey' in bunyan
CLI output, because of the
problems that causes with Solarized Dark themes (see
https://github.com/altercation/solarized/issues/220).
Changelog
bunyan 1.0.0
[issue #87] Backward incompatible change to -c CODE
improving
performance by over 10x (good!), with a backward incompatible change to
semantics (unfortunate), and adding some sugar (good!).
The -c CODE
implementation was changed to use a JS function for processing
rather than vm.runInNewContext
. The latter was specatularly slow, so
won't be missed. Unfortunately this does mean a few semantic differences in
the CODE
, the most noticeable of which is that this
is required to
access the object fields:
# Bad. Works with bunyan 0.x but not 1.x.
$ bunyan -c 'pid === 123' foo.log
...
# Good. Works with all versions of bunyan
$ bunyan -c 'this.pid === 123' foo.log
...
The old behaviour of -c
can be restored with the BUNYAN_EXEC=vm
environment variable:
$ BUNYAN_EXEC=vm bunyan -c 'pid === 123' foo.log
...
Some sugar was also added: the TRACE, DEBUG, ... constants are defined, so one can:
$ bunyan -c 'this.level >= ERROR && this.component === "http"' foo.log
...
And example of the speed improvement on a 10 MiB log example:
$ time BUNYAN_EXEC=vm bunyan -c 'this.level === ERROR' big.log | cat >slow
real 0m6.349s
user 0m6.292s
sys 0m0.110s
$ time bunyan -c 'this.level === ERROR' big.log | cat >fast
real 0m0.333s
user 0m0.303s
sys 0m0.028s
The change was courtesy Patrick Mooney (https://github.com/pfmooney). Thanks!
Add bunyan -0 ...
shortcut for bunyan -o bunyan ...
.
[issue #135] Backward incompatible. Drop dtrace-provider even from
optionalDependencies
. Dtrace-provider has proven a consistent barrier to
installing bunyan, because it is a binary dep. Even as an optional dep it
still caused confusion and install noise.
Users of Bunyan on dtrace-y platforms (SmartOS, Mac, Illumos, Solaris) will
need to manually npm install dtrace-provider
themselves to get Bunyan's
dtrace support
to work. If not installed, bunyan should stub it out properly.