UNPKG

47.1 kBMarkdownView Raw
1# bunyan Changelog
2
3See [the bunyan@2.x changelog](https://github.com/trentm/node-bunyan/blob/master/CHANGES.md)
4for details on recent 2.x releases.
5
6Known issues:
7
8- [issue #58] Can't install to a dir with spaces. This is [this node-gyp
9 bug](https://github.com/TooTallNate/node-gyp/issues/65).
10
11## not yet released
12
13(nothing yet)
14
15## 1.8.15
16
17- [pull #575, #278] Change the default "req" serializer to accept expressjs's
18 `req.originalUrl` for the "url" field per
19 <https://expressjs.com/en/api.html#req.originalUrl>. (By @twelve17 and
20 @kingcody.)
21- Development change: Switch to node-tap for testing (from nodeunit, which is
22 now obsolete). Currently just tap v9 because that is the last major version
23 of node-tap that supports back to node v0.10.
24
25## 1.8.14
26
27- [pull #558] Update minimum "moment" version to 2.19.3 for CVE-2017-18214.
28- [issue #589] Use `os.EOL` for newlines in bunyan output, which helps with
29 some Unix-EOL-naive apps like notepad. (By @bwknight877.)
30- Development change: Switched to GitHub Actions for CI.
31
32## 1.8.13
33
34- Fix a vulnerability from a crafted argument to 'bunyan -p ARG'
35
36 This was reported privately as:
37 https://hackerone.com/reports/902739
38 bunyan - RCE via insecure command formatting
39
40 Previous to this version the 'bunyan' CLI was not escaping a given argument
41 to the '-p' option before executing `ps -A -o pid,command | grep '$ARG'`
42 which could lead to unintended execution.
43
44## 1.8.12
45
46- [issue #444] Fix the `bunyan` CLI to not duplicate the "HTTP/1.1 ..." status
47 line when serializing a "res" field.
48
49
50## 1.8.11
51
52- [issue #504] The `bunyan` 1.x CLI adds a `Host: $client_req.address[:$client_req.port]`
53 header when rendering a `client_req` field in a log record. Fix that here to:
54 (a) not add it if `client_req.headers` already includes a host header; and
55 (b) not include the given `port` if it is 80 or 443 (*assuming* that is the
56 default port.
57 Note: `bunyan` 2.x CLI will stop adding this Host header because it is a guess
58 that can be wrong and misleading.
59
60
61## 1.8.10
62
63- Ensure that `bunyan` errors out if attempting to use `-p PID` and
64 file args at the same time.
65
66
67## 1.8.9
68
69- [pull #409, issue #246] Revert a change added to the `bunyan` CLI version
70 1.0.1 where `SIGINT` was ignored, such that Ctrl+C could not be used to
71 terminate bunyan. (By @zbjornson and @davepacheco.)
72- [pull #469] Fix a strict mode (`"use strict;"`) error in some versions of
73 Safari.
74
75
76## 1.8.8
77
78- Fix breakage due to a silly last minute "fix 'make check'".
79
80
81## 1.8.7
82
83Note: *Bad release.* Use 1.8.8 or later.
84
85- [issue #484] Fix breakage due to #474 in previous release.
86
87
88## 1.8.6
89
90Note: *Bad release.* Use 1.8.7 or later.
91
92- [issue #474] Bunyan's `safeCycles` is too slow when logging large objects.
93
94
95## 1.8.5
96
97- [issue #401] Improved performance when using disabled log levels.
98
99
100## 1.8.4
101
102- [issue #454] Fix `src` usage with node v7.
103
104
105## 1.8.3
106
107- [issue #450] Fix `log.info(null)` crash that resulted from #426 in v1.8.2.
108
109
110## 1.8.2
111
112- [issue #449] Bump dtrace-provider dep to 0.7.0 to help avoid deprecation
113 warnings with node v6 in some cases.
114- [issue #426] Ensure `log.info({err: err})` results in a "msg" value, just
115 like `log.info(err)`.
116
117
118## 1.8.1
119
120- [pull #386] Fix bad bug in rotation that could cause a crash with
121 error message "cannot start a rotation when already rotating"
122 (by Frankie O'Rourke). The bug was introduced in 1.8.0.
123
124
125## 1.8.0
126
127Note: *Bad release.* An addition in this release broke 'rotating-file' usage.
128Use 1.8.1 or later.
129
130- [issue #370] Fix `bunyan -p ...` (i.e. DTrace integration) on node
131 4.x and 5.x.
132- [issue #329, pull #330] Update the 'rotating-file' stream to do a file
133 rotation on initialization if the mtime on the file path indicates the
134 last rotation time was missed -- i.e. if the app wasn't running at the
135 time. (by Paul Milham.)
136
137
138## 1.7.1
139
140- [issue #332, pull #355] Ensure stream for type='stream' stream is a writable
141 stream. (By Michael Nisi.)
142
143- [issue #344] Fix "rotating-file" Bunyan streams to not miss rotations when configured
144 for a period greater than approximately 25 days. Before this there was an issue
145 where periods greater than node.js's maximum `setTimeout` length would fail to rotate.
146 (By Martijn Schrage.)
147
148- [issue #234, pull #345] Improve `bunyan` CLI rendering of "res" field
149 HTTP responses to not show two blank lines for an empty body.
150 (By Michael Nisi.)
151
152
153## 1.7.0
154
155- [pull #311, #302, #310] Improve the runtime environment detection to fix
156 running under [NW.js](http://nwjs.io/). Contributions by Adam Lynch, Jeremy
157 Ruppel, and Aleksey Timchenko.
158
159- [pull #318] Add `reemitErrorEvents` optional boolean for streams added to a
160 Bunyan logger to control whether an "error" event on the stream will be
161 re-emitted on the `Logger` instance.
162
163 var log = bunyan.createLogger({
164 name: 'foo',
165 streams: [
166 {
167 type: 'raw',
168 stream: new MyCustomStream(),
169 reemitErrorEvents: true
170 }
171 ]
172 });
173
174 Before this change, "error" events were re-emitted on [`file`
175 streams](https://github.com/trentm/node-bunyan#stream-type-file) only. The new
176 behaviour is as follows:
177
178 - `reemitErrorEvents` not specified: `file` streams will re-emit error events
179 on the Logger instance.
180 - `reemitErrorEvents: true`: error events will be re-emitted on the Logger
181 for any stream with a `.on()` function -- which includes file streams,
182 process.stdout/stderr, and any object that inherits from EventEmitter.
183 - `reemitErrorEvents: false`: error events will not be re-emitted for any
184 streams.
185
186 Dev Note: Bunyan `Logger` objects don't currently have a `.close()` method
187 in which registered error event handlers can be *un*registered. That means
188 that a (presumably rare) situation where code adds dozens of Bunyan Logger
189 streams to, e.g. process.stdout, and with `reemitErrorEvents: true`, could
190 result in leaking Logger objects.
191
192 Original work for allowing "error" re-emitting on non-file streams is
193 by Marc Udoff in pull #318.
194
195
196## 1.6.0
197
198- [pull #304, issue #245] Use [Moment.js][momentjs.com] library to handle
199 `bunyan` CLI time formatting in some cases, especially to fix display of
200 local time. It is now required for local time formatting (i.e. `bunyan -L`
201 or `bunyan --time local`). (By David M. Lee.)
202
203- [pull #252] Fix errant `client_res={}` in `bunyan` CLI rendering, and avoid
204 extra newlines in `client_req` rendering in some cases. (By Thomas Heymann.)
205
206- [pull #291, issue #303] Fix `LOG.child(...)` to *not* override the "hostname"
207 field of the parent. A use case is when one manually sets "hostname" to
208 something other than `os.hostname()`. (By github.com/Cactusbone.)
209
210- [issue #325] Allow one to set `level: 0` in `createLogger` to turn on
211 logging for all levels. (Adapted from #336 by github.com/sometimesalready.)
212
213- Add guards (to `resolveLevel`) so that all "level" values are validated.
214 Before this, a bogus level like "foo" or -12 or `['some', 'array']` would
215 silently be accepted -- with undefined results.
216
217- Doc updates for #340 and #305.
218
219- Update `make test` to test against node 5, 4, 0.12 and 0.10.
220
221
222## 1.5.1
223
224- [issue #296] Fix `src: true`, which was broken in v1.5.0.
225
226
227## 1.5.0
228
229Note: *Bad release.* The addition of `'use strict';` broke Bunyan's `src: true`
230feature. Use 1.5.1 instead.
231
232- [pull #236, issue #231, issue #223] Fix strict mode in the browser.
233- [pull #282, issue #213] Fixes bunyan to work with webpack. By Denis Izmaylov.
234- [pull #294] Update to dtrace-provider 0.6 to fix with node 4.0 and io.js 3.0.
235- Dropped support for 0.8 (can't install deps easily anymore for running
236 test suite). Bump to a recent iojs version for testing.
237
238
239## 1.4.0
240
241(Bumping minor ver b/c I'm wary of dtrace-provider changes. :)
242
243- [issue #258, pull #259] Update to dtrace-provider 0.5 to fix
244 install and tests on recent io.js versions.
245- safe-json-stringify@1.0.3 changed output, breaking some tests. Fix those.
246
247
248## 1.3.6
249
250- [issue #244] Make `bunyan` defensive on `res.header=null`.
251
252
253## 1.3.5
254
255- [issue #233] Make `bunyan` defensive on res.header as a boolean.
256- [issue #242] Make `bunyan` defensive on err.stack not being a string.
257
258
259## 1.3.4
260
261- Allow `log.child(...)` to work even if the logger is a *sub-class*
262 of Bunyan's Logger class.
263- [issue #219] Hide 'source-map-support' require from browserify.
264- [issue #218] Reset `haveNonRawStreams` on `<logger>.addStream`.
265
266
267## 1.3.3
268
269- [pull #127] Update to dtrace-provider 0.4.0, which gives io.js 1.x support
270 for dtrace-y parts of Bunyan.
271
272
273## 1.3.2
274
275- [pull #182] Fallback to using the optional 'safe-json-stringify' module
276 if `JSON.stringify` throws -- possibly with an enumerable property
277 getter than throws. By Martin Gausby.
278
279
280## 1.3.1
281
282- Export `bunyan.RotatingFileStream` which is needed if one wants to
283 customize it. E.g. see issue #194.
284
285- [pull #122] Source Map support for caller line position for [the "src"
286 field](https://github.com/trentm/node-bunyan#src). This could be interesting
287 for [CoffeeScript](http://coffeescript.org/documentation/docs/sourcemap.html)
288 users of Bunyan. By Manuel Schneider.
289
290- [issue #164] Ensure a top-level `level` given in `bunyan.createLogger`
291 is *used* for given `streams`. For example, ensure that the following
292 results in the stream having a DEBUG level:
293
294 var log = bunyan.createLogger({
295 name: 'foo',
296 level: 'debug',
297 streams: [
298 {
299 path: '/var/tmp/foo.log'
300 }
301 ]
302 });
303
304 This was broken in the 1.0.1 release. Between that release and 1.3.0
305 the "/var/tmp/foo.log" stream would be at the INFO level (Bunyan's
306 default level).
307
308
309## 1.3.0
310
311- [issue #103] `bunyan -L` (or `bunyan --time local`) to show local time.
312 Bunyan log records store `time` in UTC time. Sometimes it is convenient
313 to display in local time.
314
315- [issue #205] Fix the "The Bunyan CLI crashed!" checking to properly warn of
316 the common failure case when `-c CONDITION` is being used.
317
318
319## 1.2.4
320
321- [issue #210] Export `bunyan.nameFromLevel` and `bunyan.levelFromName`. It can
322 be a pain for custom streams to have to reproduce that.
323
324- [issue #100] Gracefully handle the case of an unbound
325 `Logger.{info,debug,...}` being used for logging, e.g.:
326
327 myEmittingThing.on('data', log.info)
328
329 Before this change, bunyan would throw. Now it emits a warning to stderr
330 *once*, and then silently ignores those log attempts, e.g.:
331
332 bunyan usage error: /Users/trentm/tm/node-bunyan/foo.js:12: attempt to log with an unbound log method: `this` is: { _events: { data: [Function] } }
333
334
335## 1.2.3
336
337- [issue #184] Fix log rotation for rotation periods > ~25 days. Before this
338 change, a rotation period longer than this could hit [the maximum setTimeout
339 delay in node.js](https://github.com/joyent/node/issues/8656). By Daniel Juhl.
340
341
342## 1.2.2
343
344- Drop the guard that a bunyan Logger level must be between TRACE (10)
345 and FATAL (60), inclusive. This allows a trick of setting the level
346 to `FATAL + 1` to turn logging off. While the standard named log levels are
347 the golden path, then intention was not to get in the way of using
348 other level numbers.
349
350
351## 1.2.1
352
353- [issue #178, #181] Get at least dtrace-provider 0.3.1 for
354 optionalDependencies to get a fix for install with decoupled npm (e.g. with
355 homebrew's node and npm).
356
357
358## 1.2.0
359
360- [issue #157] Restore dtrace-provider as a dependency (in
361 "optionalDependencies").
362
363 Dtrace-provider version 0.3.0 add build sugar that should eliminate the
364 problems from older versions:
365 The build is not attempted on Linux and Windows. The build spew is
366 *not* emitted by default (use `V=1 npm install` to see it); instead a
367 short warning is emitted if the build fails.
368
369 Also, importantly, the new dtrace-provider fixes working with node
370 v0.11/0.12.
371
372
373## 1.1.3
374
375- [issue #165] Include extra `err` fields in `bunyan` CLI output. Before
376 this change only the fields part of the typical node.js error stack
377 (err.stack, err.message, err.name) would be emitted, even though
378 the Bunyan *library* would typically include err.code and err.signal
379 in the raw JSON log record.
380
381
382## 1.1.2
383
384- Fix a breakage in `log.info(err)` on a logger with no serializers.
385
386
387## 1.1.1
388
389Note: *Bad release.* It breaks `log.info(err)` on a logger with no serializers.
390Use version 1.1.2.
391
392- [pull #168] Fix handling of `log.info(err)` to use the `log` Logger's `err`
393 serializer if it has one, instead of always using the core Bunyan err
394 serializer. (By Mihai Tomescu.)
395
396
397## 1.1.0
398
399- [issue #162] Preliminary support for [browserify](http://browserify.org/).
400 See [the section in the README](../README.md#browserify).
401
402
403## 1.0.1
404
405- [issues #105, #138, #151] Export `<Logger>.addStream(...)` and
406 `<Logger>.addSerializers(...)` to be able to add them after Logger creation.
407 Thanks @andreineculau!
408
409- [issue #159] Fix bad handling in construtor guard intending to allow
410 creation without "new": `var log = Logger(...)`. Thanks @rmg!
411
412- [issue #156] Smaller install size via .npmignore file.
413
414- [issue #126, #161] Ignore SIGINT (Ctrl+C) when processing stdin. `...| bunyan`
415 should expect the preceding process in the pipeline to handle SIGINT. While
416 it is doing so, `bunyan` should continue to process any remaining output.
417 Thanks @timborodin and @jnordberg!
418
419- [issue #160] Stop using ANSI 'grey' in `bunyan` CLI output, because of the
420 problems that causes with Solarized Dark themes (see
421 <https://github.com/altercation/solarized/issues/220>).
422
423
424## 1.0.0
425
426- [issue #87] **Backward incompatible change to `-c CODE`** improving
427 performance by over 10x (good!), with a backward incompatible change to
428 semantics (unfortunate), and adding some sugar (good!).
429
430 The `-c CODE` implementation was changed to use a JS function for processing
431 rather than `vm.runInNewContext`. The latter was specatularly slow, so
432 won't be missed. Unfortunately this does mean a few semantic differences in
433 the `CODE`, the most noticeable of which is that **`this` is required to
434 access the object fields:**
435
436 # Bad. Works with bunyan 0.x but not 1.x.
437 $ bunyan -c 'pid === 123' foo.log
438 ...
439
440 # Good. Works with all versions of bunyan
441 $ bunyan -c 'this.pid === 123' foo.log
442 ...
443
444 The old behaviour of `-c` can be restored with the `BUNYAN_EXEC=vm`
445 environment variable:
446
447 $ BUNYAN_EXEC=vm bunyan -c 'pid === 123' foo.log
448 ...
449
450 Some sugar was also added: the TRACE, DEBUG, ... constants are defined, so
451 one can:
452
453 $ bunyan -c 'this.level >= ERROR && this.component === "http"' foo.log
454 ...
455
456 And example of the speed improvement on a 10 MiB log example:
457
458 $ time BUNYAN_EXEC=vm bunyan -c 'this.level === ERROR' big.log | cat >slow
459
460 real 0m6.349s
461 user 0m6.292s
462 sys 0m0.110s
463
464 $ time bunyan -c 'this.level === ERROR' big.log | cat >fast
465
466 real 0m0.333s
467 user 0m0.303s
468 sys 0m0.028s
469
470 The change was courtesy Patrick Mooney (https://github.com/pfmooney). Thanks!
471
472- Add `bunyan -0 ...` shortcut for `bunyan -o bunyan ...`.
473
474- [issue #135] **Backward incompatible.** Drop dtrace-provider even from
475 `optionalDependencies`. Dtrace-provider has proven a consistent barrier to
476 installing bunyan, because it is a binary dep. Even as an *optional* dep it
477 still caused confusion and install noise.
478
479 Users of Bunyan on dtrace-y platforms (SmartOS, Mac, Illumos, Solaris) will
480 need to manually `npm install dtrace-provider` themselves to get [Bunyan's
481 dtrace support](https://github.com/trentm/node-bunyan#runtime-log-snooping-via-dtrace)
482 to work. If not installed, bunyan should stub it out properly.
483
484
485
486## 0.23.1
487
488- [pull #125, pull #97, issue #73] Unref rotating-file timeout which was
489 preventing processes from exiting (by https://github.com/chakrit and
490 https://github.com/glenn-murray-bse). Note: this only fixes the issue
491 for node 0.10 and above.
492
493
494## 0.23.0
495
496- [issue #139] Fix `bunyan` crash on a log record with `res.header` that is an
497 object. A side effect of this improvement is that a record with `res.statusCode`
498 but no header info will render a response block, for example:
499
500 [2012-08-08T10:25:47.637Z] INFO: my-service/12859 on my-host: some message (...)
501 ...
502 --
503 HTTP/1.1 200 OK
504 --
505 ...
506
507- [pull #42] Fix `bunyan` crash on a log record with `req.headers` that is a *string*
508 (by https://github.com/aexmachina).
509
510- Drop node 0.6 support. I can't effectively `npm install` with a node 0.6
511 anymore.
512
513- [issue #85] Ensure logging a non-object/non-string doesn't throw (by
514 https://github.com/mhart). This changes fixes:
515
516 log.info(<bool>) # TypeError: Object.keys called on non-object
517 log.info(<function>) # "msg":"" (instead of wanted "msg":"[Function]")
518 log.info(<array>) # "msg":"" (instead of wanted "msg":util.format(<array>))
519
520
521## 0.22.3
522
523- Republish the same code to npm.
524
525
526## 0.22.2
527
528Note: Bad release. The published package in the npm registry got corrupted. Use 0.22.3 or later.
529
530- [issue #131] Allow `log.info(<number>)` and, most importantly, don't crash on that.
531
532- Update 'mv' optional dep to latest.
533
534
535## 0.22.1
536
537- [issue #111] Fix a crash when attempting to use `bunyan -p` on a platform without
538 dtrace.
539
540- [issue #101] Fix a crash in `bunyan` rendering a record with unexpected "res.headers".
541
542
543## 0.22.0
544
545- [issue #104] `log.reopenFileStreams()` convenience method to be used with external log
546 rotation.
547
548
549## 0.21.4
550
551- [issue #96] Fix `bunyan` to default to paging (with `less`) by default in node 0.10.0.
552 The intention has always been to default to paging for node >=0.8.
553
554
555## 0.21.3
556
557- [issue #90] Fix `bunyan -p '*'` breakage in version 0.21.2.
558
559
560## 0.21.2
561
562**Note: Bad release. The switchrate change below broke `bunyan -p '*'` usage
563(see issue #90). Use 0.21.3 or later.**
564
565- [issue #88] Should be able to efficiently combine "-l" with "-p *".
566
567- Avoid DTrace buffer filling up, e.g. like this:
568
569 $ bunyan -p 42241 > /tmp/all.log
570 dtrace: error on enabled probe ID 3 (ID 75795: bunyan42241:mod-87ea640:log-trace:log-trace): out of scratch space in action #1 at DIF offset 12
571 dtrace: error on enabled probe ID 3 (ID 75795: bunyan42241:mod-87ea640:log-trace:log-trace): out of scratch space in action #1 at DIF offset 12
572 dtrace: 138 drops on CPU 4
573 ...
574
575 From Bryan: "the DTrace buffer is filling up because the string size is so
576 large... by increasing the switchrate, you're increasing the rate at
577 which that buffer is emptied."
578
579
580## 0.21.1
581
582- [pull #83] Support rendering 'client_res' key in bunyan CLI (by
583 github.com/mcavage).
584
585
586## 0.21.0
587
588- 'make check' clean, 4-space indenting. No functional change here, just
589 lots of code change.
590- [issue #80, #82] Drop assert that broke using 'rotating-file' with
591 a default `period` (by github.com/ricardograca).
592
593
594## 0.20.0
595
596- [Slight backward incompatibility] Fix serializer bug introduced in 0.18.3
597 (see below) to only apply serializers to log records when appropriate.
598
599 This also makes a semantic change to custom serializers. Before this change
600 a serializer function was called for a log record key when that value was
601 truth-y. The semantic change is to call the serializer function as long
602 as the value is not `undefined`. That means that a serializer function
603 should handle falsey values such as `false` and `null`.
604
605- Update to latest 'mv' dep (required for rotating-file support) to support
606 node v0.10.0.
607
608
609## 0.19.0
610
611**WARNING**: This release includes a bug introduced in bunyan 0.18.3 (see
612below). Please upgrade to bunyan 0.20.0.
613
614- [Slight backward incompatibility] Change the default error serialization
615 (a.k.a. `bunyan.stdSerializers.err`) to *not* serialize all additional
616 attributes of the given error object. This is an open door to unsafe logging
617 and logging should always be safe. With this change, error serialization
618 will log these attributes: message, name, stack, code, signal. The latter
619 two are added because some core node APIs include those fields (e.g.
620 `child_process.exec`).
621
622 Concrete examples where this has hurt have been the "domain" change
623 necessitating 0.18.3 and a case where
624 [node-restify](https://github.com/mcavage/node-restify) uses an error object
625 as the response object. When logging the `err` and `res` in the same log
626 statement (common for restify audit logging), the `res.body` would be JSON
627 stringified as '[Circular]' as it had already been emitted for the `err` key.
628 This results in a WTF with the bunyan CLI because the `err.body` is not
629 rendered.
630
631 If you need the old behaviour back you will need to do this:
632
633 var bunyan = require('bunyan');
634 var errSkips = {
635 // Skip domain keys. `domain` especially can have huge objects that can
636 // OOM your app when trying to JSON.stringify.
637 domain: true,
638 domain_emitter: true,
639 domain_bound: true,
640 domain_thrown: true
641 };
642 bunyan.stdSerializers.err = function err(err) {
643 if (!err || !err.stack)
644 return err;
645 var obj = {
646 message: err.message,
647 name: err.name,
648 stack: getFullErrorStack(err)
649 }
650 Object.keys(err).forEach(function (k) {
651 if (err[k] !== undefined && !errSkips[k]) {
652 obj[k] = err[k];
653 }
654 });
655 return obj;
656 };
657
658- "long" and "bunyan" output formats for the CLI. `bunyan -o long` is the default
659 format, the same as before, just called "long" now instead of the cheesy "paul"
660 name. The "bunyan" output format is the same as "json-0", just with a more
661 convenient name.
662
663
664## 0.18.3
665
666**WARNING**: This release introduced a bug such that all serializers are
667applied to all log records even if the log record did not contain the key
668for that serializer. If a logger serializer function does not handle
669being given `undefined`, then you'll get warnings like this on stderr:
670
671 bunyan: ERROR: This should never happen. This is a bug in <https://github.com/trentm/node-bunyan> or in this application. Exception from "foo" Logger serializer: Error: ...
672 at Object.bunyan.createLogger.serializers.foo (.../myapp.js:20:15)
673 at Logger._applySerializers (.../lib/bunyan.js:644:46)
674 at Array.forEach (native)
675 at Logger._applySerializers (.../lib/bunyan.js:640:33)
676 ...
677
678and the following junk in written log records:
679
680 "foo":"(Error in Bunyan log "foo" serializer broke field. See stderr for details.)"
681
682Please upgrade to bunyan 0.20.0.
683
684
685- Change the `bunyan.stdSerializers.err` serializer for errors to *exclude*
686 [the "domain*" keys](http://nodejs.org/docs/latest/api/all.html#all_additions_to_error_objects).
687 `err.domain` will include its assigned members which can arbitrarily large
688 objects that are not intended for logging.
689
690- Make the "dtrace-provider" dependency optional. I hate to do this, but
691 installing bunyan on Windows is made very difficult with this as a required
692 dep. Even though "dtrace-provider" stubs out for non-dtrace-y platforms,
693 without a compiler and Python around, node-gyp just falls over.
694
695
696## 0.18.2
697
698- [pull #67] Remove debugging prints in rotating-file support.
699 (by github.com/chad3814).
700- Update to dtrace-provider@0.2.7.
701
702
703## 0.18.1
704
705- Get the `bunyan` CLI to **not** automatically page (i.e. pipe to `less`)
706 if stdin isn't a TTY, or if following dtrace probe output (via `-p PID`),
707 or if not given log file arguments.
708
709
710## 0.18.0
711
712- Automatic paging support in the `bunyan` CLI (similar to `git log` et al).
713 IOW, `bunyan` will open your pager (by default `less`) and pipe rendered
714 log output through it. A main benefit of this is getting colored logs with
715 a pager without the pain. Before you had to explicit use `--color` to tell
716 bunyan to color output when the output was not a TTY:
717
718 bunyan foo.log --color | less -R # before
719 bunyan foo.log # now
720
721 Disable with the `--no-pager` option or the `BUNYAN_NO_PAGER=1` environment
722 variable.
723
724 Limitations: Only supported for node >=0.8. Windows is not supported (at
725 least not yet).
726
727- Switch test suite to nodeunit (still using a node-tap'ish API via
728 a helper).
729
730
731## 0.17.0
732
733- [issue #33] Log rotation support:
734
735 var bunyan = require('bunyan');
736 var log = bunyan.createLogger({
737 name: 'myapp',
738 streams: [{
739 type: 'rotating-file',
740 path: '/var/log/myapp.log',
741 count: 7,
742 period: 'daily'
743 }]
744 });
745
746
747- Tweak to CLI default pretty output: don't special case "latency" field.
748 The special casing was perhaps nice, but less self-explanatory.
749 Before:
750
751 [2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (15ms, audit=true, bar=baz)
752 GET /foo
753 ...
754
755 After:
756
757 [2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (audit=true, bar=baz, latency=15)
758 GET /foo
759 ...
760
761- *Exit* CLI on EPIPE, otherwise we sit there useless processing a huge log
762 file with, e.g. `bunyan huge.log | head`.
763
764
765## 0.16.8
766
767- Guards on `-c CONDITION` usage to attempt to be more user friendly.
768 Bogus JS code will result in this:
769
770 $ bunyan portal.log -c 'this.req.username==boo@foo'
771 bunyan: error: illegal CONDITION code: SyntaxError: Unexpected token ILLEGAL
772 CONDITION script:
773 Object.prototype.TRACE = 10;
774 Object.prototype.DEBUG = 20;
775 Object.prototype.INFO = 30;
776 Object.prototype.WARN = 40;
777 Object.prototype.ERROR = 50;
778 Object.prototype.FATAL = 60;
779 this.req.username==boo@foo
780 Error:
781 SyntaxError: Unexpected token ILLEGAL
782 at new Script (vm.js:32:12)
783 at Function.Script.createScript (vm.js:48:10)
784 at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:465:27)
785 at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16)
786 at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3)
787 at Module._compile (module.js:449:26)
788 at Object.Module._extensions..js (module.js:467:10)
789 at Module.load (module.js:356:32)
790 at Function.Module._load (module.js:312:12)
791 at Module.runMain (module.js:492:10)
792
793 And all CONDITION scripts will be run against a minimal valid Bunyan
794 log record to ensure they properly guard against undefined values
795 (at least as much as can reasonably be checked). For example:
796
797 $ bunyan portal.log -c 'this.req.username=="bob"'
798 bunyan: error: CONDITION code cannot safely filter a minimal Bunyan log record
799 CONDITION script:
800 Object.prototype.TRACE = 10;
801 Object.prototype.DEBUG = 20;
802 Object.prototype.INFO = 30;
803 Object.prototype.WARN = 40;
804 Object.prototype.ERROR = 50;
805 Object.prototype.FATAL = 60;
806 this.req.username=="bob"
807 Minimal Bunyan log record:
808 {
809 "v": 0,
810 "level": 30,
811 "name": "name",
812 "hostname": "hostname",
813 "pid": 123,
814 "time": 1355514346206,
815 "msg": "msg"
816 }
817 Filter error:
818 TypeError: Cannot read property 'username' of undefined
819 at bunyan-condition-0:7:9
820 at Script.Object.keys.forEach.(anonymous function) [as runInNewContext] (vm.js:41:22)
821 at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:477:18)
822 at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16)
823 at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3)
824 at Module._compile (module.js:449:26)
825 at Object.Module._extensions..js (module.js:467:10)
826 at Module.load (module.js:356:32)
827 at Function.Module._load (module.js:312:12)
828 at Module.runMain (module.js:492:10)
829
830 A proper way to do that condition would be:
831
832 $ bunyan portal.log -c 'this.req && this.req.username=="bob"'
833
834
835
836## 0.16.7
837
838- [issue #59] Clear a possibly interrupted ANSI color code on signal
839 termination.
840
841
842## 0.16.6
843
844- [issue #56] Support `bunyan -p NAME` to dtrace all PIDs matching 'NAME' in
845 their command and args (using `ps -A -o pid,command | grep NAME` or, on SunOS
846 `pgrep -lf NAME`). E.g.:
847
848 bunyan -p myappname
849
850 This is useful for usage of node's [cluster
851 module](http://nodejs.org/docs/latest/api/all.html#all_cluster) where you'll
852 have multiple worker processes.
853
854
855## 0.16.5
856
857- Allow `bunyan -p '*'` to capture bunyan dtrace probes from **all** processes.
858- issue #55: Add support for `BUNYAN_NO_COLOR` environment variable to
859 turn off all output coloring. This is still overridden by the `--color`
860 and `--no-color` options.
861
862
863## 0.16.4
864
865- issue #54: Ensure (again, see 0.16.2) that stderr from the dtrace child
866 process (when using `bunyan -p PID`) gets through. There had been a race
867 between exiting bunyan and the flushing of the dtrace process' stderr.
868
869
870## 0.16.3
871
872- Drop 'trentm-dtrace-provider' fork dep now that
873 <https://github.com/chrisa/node-dtrace-provider/pull/24> has been resolved.
874 Back to dtrace-provider.
875
876
877## 0.16.2
878
879- Ensure that stderr from the dtrace child process (when using `bunyan -p PID`)
880 gets through. The `pipe` usage wasn't working on SmartOS. This is important
881 to show the user if they need to 'sudo'.
882
883
884## 0.16.1
885
886- Ensure that a possible dtrace child process (with using `bunyan -p PID`) is
887 terminated on signal termination of the bunyan CLI (at least for SIGINT,
888 SIGQUIT, SIGTERM, SIGHUP).
889
890
891## 0.16.0
892
893- Add `bunyan -p PID` support. This is a convenience wrapper that effectively
894 calls:
895
896 dtrace -x strsize=4k -qn 'bunyan$PID:::log-*{printf("%s", copyinstr(arg0))}' | bunyan
897
898
899## 0.15.0
900
901- issue #48: Dtrace support! The elevator pitch is you can watch all logging
902 from all Bunyan-using process with something like this:
903
904 dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%d: %s: %s", pid, probefunc, copyinstr(arg0))}'
905
906 And this can include log levels *below* what the service is actually configured
907 to log. E.g. if the service is only logging at INFO level and you need to see
908 DEBUG log messages, with this you can. Obviously this only works on dtrace-y
909 platforms: Illumos derivatives of SunOS (e.g. SmartOS, OmniOS), Mac, FreeBSD.
910
911 Or get the bunyan CLI to render logs nicely:
912
913 dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%s", copyinstr(arg0))}' | bunyan
914
915 See <https://github.com/trentm/node-bunyan#dtrace-support> for details. By
916 Bryan Cantrill.
917
918
919## 0.14.6
920
921- Export `bunyan.safeCycles()`. This may be useful for custom `type == "raw"`
922 streams that may do JSON stringification of log records themselves. Usage:
923
924 var str = JSON.stringify(rec, bunyan.safeCycles());
925
926- [issue #49] Allow a `log.child()` to specify the level of inherited streams.
927 For example:
928
929 # Before
930 var childLog = log.child({...});
931 childLog.level('debug');
932
933 # After
934 var childLog = log.child({..., level: 'debug'});
935
936- Improve the Bunyan CLI crash message to make it easier to provide relevant
937 details in a bug report.
938
939
940## 0.14.5
941
942- Fix a bug in the long-stack-trace error serialization added in 0.14.4. The
943 symptom:
944
945 bunyan@0.14.4: .../node_modules/bunyan/lib/bunyan.js:1002
946 var ret = ex.stack || ex.toString();
947 ^
948 TypeError: Cannot read property 'stack' of undefined
949 at getFullErrorStack (.../node_modules/bunyan/lib/bunyan.js:1002:15)
950 ...
951
952
953## 0.14.4
954
955- **Bad release. Use 0.14.5 instead.**
956- Improve error serialization to walk the chain of `.cause()` errors
957 from the likes of `WError` or `VError` error classes from
958 [verror](https://github.com/davepacheco/node-verror) and
959 [restify v2.0](https://github.com/mcavage/node-restify). Example:
960
961 [2012-10-11T00:30:21.871Z] ERROR: imgapi/99612 on 0525989e-2086-4270-b960-41dd661ebd7d: my-message
962 ValidationFailedError: my-message; caused by TypeError: cause-error-message
963 at Server.apiPing (/opt/smartdc/imgapi/lib/app.js:45:23)
964 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
965 at Server.setupReq (/opt/smartdc/imgapi/lib/app.js:178:9)
966 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
967 at Server.parseBody (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/body_parser.js:15:33)
968 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
969 at Server.parseQueryString (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/query.js:40:25)
970 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
971 at Server._run (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:579:17)
972 at Server._handle.log.trace.req (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:480:38)
973 Caused by: TypeError: cause-error-message
974 at Server.apiPing (/opt/smartdc/imgapi/lib/app.js:40:25)
975 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
976 at Server.setupReq (/opt/smartdc/imgapi/lib/app.js:178:9)
977 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
978 at Server.parseBody (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/body_parser.js:15:33)
979 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
980 at Server.parseQueryString (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/query.js:40:25)
981 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
982 at Server._run (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:579:17)
983 at Server._handle.log.trace.req (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:480:38)
984
985
986## 0.14.2
987
988- [issue #45] Fix bunyan CLI (default output mode) to not crash on a 'res'
989 field that isn't a response object, but a string.
990
991
992## 0.14.1
993
994- [issue #44] Fix the default `bunyan` CLI output of a `res.body` that is an
995 object instead of a string. See issue#38 for the same with `req.body`.
996
997
998## 0.14.0
999
1000- [pull #41] Safe `JSON.stringify`ing of emitted log records to avoid blowing
1001 up on circular objects (by Isaac Schlueter).
1002
1003
1004## 0.13.5
1005
1006- [issue #39] Fix a bug with `client_req` handling in the default output
1007 of the `bunyan` CLI.
1008
1009
1010## 0.13.4
1011
1012- [issue #38] Fix the default `bunyan` CLI output of a `req.body` that is an
1013 object instead of a string.
1014
1015
1016## 0.13.3
1017
1018- Export `bunyan.resolveLevel(NAME-OR-NUM)` to resolve a level name or number
1019 to its log level number value:
1020
1021 > bunyan.resolveLevel('INFO')
1022 30
1023 > bunyan.resolveLevel('debug')
1024 20
1025
1026 A side-effect of this change is that the uppercase level name is now allowed
1027 in the logger constructor.
1028
1029
1030## 0.13.2
1031
1032- [issue #35] Ensure that an accidental `log.info(BUFFER)`, where BUFFER is
1033 a node.js Buffer object, doesn't blow up.
1034
1035
1036## 0.13.1
1037
1038- [issue #34] Ensure `req.body`, `res.body` and other request/response fields
1039 are emitted by the `bunyan` CLI (mostly by Rob Gulewich).
1040
1041
1042
1043## 0.13.0
1044
1045- [issue #31] Re-instate defines for the (uppercase) log level names (TRACE,
1046 DEBUG, etc.) in `bunyan -c "..."` filtering condition code. E.g.:
1047
1048 $ ... | bunyan -c 'level >= ERROR'
1049
1050
1051## 0.12.0
1052
1053- [pull #32] `bunyan -o short` for more concise output (by Dave Pacheco). E.g.:
1054
1055 22:56:52.856Z INFO myservice: My message
1056
1057 instead of:
1058
1059 [2012-02-08T22:56:52.856Z] INFO: myservice/123 on example.com: My message
1060
1061
1062## 0.11.3
1063
1064- Add '--strict' option to `bunyan` CLI to suppress all but legal Bunyan JSON
1065 log lines. By default non-JSON, and non-Bunyan lines are passed through.
1066
1067
1068## 0.11.2
1069
1070- [issue #30] Robust handling of 'req' field without a 'headers' subfield
1071 in `bunyan` CLI.
1072- [issue #31] Pull the TRACE, DEBUG, et al defines from `bunyan -c "..."`
1073 filtering code. This was added in v0.11.1, but has a significant adverse
1074 affect.
1075
1076
1077## 0.11.1
1078
1079- **Bad release. The TRACE et al names are bleeding into the log records
1080 when using '-c'.**
1081- Add defines for the (uppercase) log level names (TRACE, DEBUG, etc.) in
1082 `bunyan -c "..."` filtering condition code. E.g.:
1083
1084 $ ... | bunyan -c 'level >= ERROR'
1085
1086
1087## 0.11.0
1088
1089- [pull #29] Add -l/--level for level filtering, and -c/--condition for
1090 arbitrary conditional filtering (by github.com/isaacs):
1091
1092 $ ... | bunyan -l error # filter out log records below error
1093 $ ... | bunyan -l 50 # numeric value works too
1094 $ ... | bunyan -c 'level===50' # equiv with -c filtering
1095 $ ... | bunyan -c 'pid===123' # filter on any field
1096 $ ... | bunyan -c 'pid===123' -c '_audit' # multiple filters
1097
1098
1099## 0.10.0
1100
1101- [pull #24] Support for gzip'ed log files in the bunyan CLI (by
1102 github.com/mhart):
1103
1104 $ bunyan foo.log.gz
1105 ...
1106
1107
1108## 0.9.0
1109
1110- [pull #16] Bullet proof the `bunyan.stdSerializers` (by github.com/rlidwka).
1111
1112- [pull #15] The `bunyan` CLI will now chronologically merge multiple log
1113 streams when it is given multiple file arguments. (by github.com/davepacheco)
1114
1115 $ bunyan foo.log bar.log
1116 ... merged log records ...
1117
1118- [pull #15] A new `bunyan.RingBuffer` stream class that is useful for
1119 keeping the last N log messages in memory. This can be a fast way to keep
1120 recent, and thus hopefully relevant, log messages. (by @dapsays,
1121 github.com/davepacheco)
1122
1123 Potential uses: Live debugging if a running process could inspect those
1124 messages. One could dump recent log messages at a finer log level than is
1125 typically logged on
1126 [`uncaughtException`](http://nodejs.org/docs/latest/api/all.html#all_event_uncaughtexception).
1127
1128 var ringbuffer = new bunyan.RingBuffer({ limit: 100 });
1129 var log = new bunyan({
1130 name: 'foo',
1131 streams: [{
1132 type: 'raw',
1133 stream: ringbuffer,
1134 level: 'debug'
1135 }]
1136 });
1137
1138 log.info('hello world');
1139 console.log(ringbuffer.records);
1140
1141- Add support for "raw" streams. This is a logging stream that is given
1142 raw log record objects instead of a JSON-stringified string.
1143
1144 function Collector() {
1145 this.records = [];
1146 }
1147 Collector.prototype.write = function (rec) {
1148 this.records.push(rec);
1149 }
1150 var log = new Logger({
1151 name: 'mylog',
1152 streams: [{
1153 type: 'raw',
1154 stream: new Collector()
1155 }]
1156 });
1157
1158 See "examples/raw-stream.js". I expect raw streams to be useful for
1159 piping Bunyan logging to separate services (e.g. <http://www.loggly.com/>,
1160 <https://github.com/etsy/statsd>) or to separate in-process handling.
1161
1162- Add test/corpus/*.log files (accidentally excluded) so the test suite
1163 actually works(!).
1164
1165
1166## 0.8.0
1167
1168- [pull #21] Bunyan loggers now re-emit `fs.createWriteStream` error events.
1169 By github.com/EvanOxfeld. See "examples/handle-fs-error.js" and
1170 "test/error-event.js" for details.
1171
1172 var log = new Logger({name: 'mylog', streams: [{path: FILENAME}]});
1173 log.on('error', function (err, stream) {
1174 // Handle error writing to or creating FILENAME.
1175 });
1176
1177- jsstyle'ing (via `make check`)
1178
1179
1180## 0.7.0
1181
1182- [issue #12] Add `bunyan.createLogger(OPTIONS)` form, as is more typical in
1183 node.js APIs. This'll eventually become the preferred form.
1184
1185
1186## 0.6.9
1187
1188- Change `bunyan` CLI default output to color "src" info red. Before the "src"
1189 information was uncolored. The "src" info is the filename, line number and
1190 function name resulting from using `src: true` in `Logger` creation. I.e.,
1191 the `(/Users/trentm/tm/node-bunyan/examples/hi.js:10)` in:
1192
1193 [2012-04-10T22:28:58.237Z] INFO: myapp/39339 on banana.local (/Users/trentm/tm/node-bunyan/examples/hi.js:10): hi
1194
1195- Tweak `bunyan` CLI default output to still show an "err" field if it doesn't
1196 have a "stack" attribute.
1197
1198
1199## 0.6.8
1200
1201- Fix bad bug in `log.child({...}, true);` where the added child fields **would
1202 be added to the parent's fields**. This bug only existed for the "fast child"
1203 path (that second `true` argument). A side-effect of fixing this is that
1204 the "fast child" path is only 5 times as fast as the regular `log.child`,
1205 instead of 10 times faster.
1206
1207
1208## 0.6.7
1209
1210- [issue #6] Fix bleeding 'type' var to global namespace. (Thanks Mike!)
1211
1212
1213## 0.6.6
1214
1215- Add support to the `bunyan` CLI taking log file path args, `bunyan foo.log`,
1216 in addition to the usual `cat foo.log | bunyan`.
1217- Improve reliability of the default output formatting of the `bunyan` CLI.
1218 Before it could blow up processing log records missing some expected
1219 fields.
1220
1221
1222## 0.6.5
1223
1224- ANSI coloring output from `bunyan` CLI tool (for the default output mode/style).
1225 Also add the '--color' option to force coloring if the output stream is not
1226 a TTY, e.g. `cat my.log | bunyan --color | less -R`. Use `--no-color` to
1227 disable coloring, e.g. if your terminal doesn't support ANSI codes.
1228- Add 'level' field to log record before custom fields for that record. This
1229 just means that the raw record JSON will show the 'level' field earlier,
1230 which is a bit nicer for raw reading.
1231
1232
1233## 0.6.4
1234
1235- [issue #5] Fix `log.info() -> boolean` to work properly. Previous all were
1236 returning false. Ditto all trace/debug/.../fatal methods.
1237
1238
1239## 0.6.3
1240
1241- Allow an optional `msg` and arguments to the `log.info(<Error> err)` logging
1242 form. For example, before:
1243
1244 log.debug(my_error_instance) // good
1245 log.debug(my_error_instance, "boom!") // wasn't allowed
1246
1247 Now the latter is allowed if you want to expliciting set the log msg. Of course
1248 this applies to all the `log.{trace|debug|info...}()` methods.
1249
1250- `bunyan` cli output: clarify extra fields with quoting if empty or have
1251 spaces. E.g. 'cmd' and 'stderr' in the following:
1252
1253 [2012-02-12T00:30:43.736Z] INFO: mo-docs/43194 on banana.local: buildDocs results (req_id=185edca2-2886-43dc-911c-fe41c09ec0f5, route=PutDocset, error=null, stderr="", cmd="make docs")
1254
1255
1256## 0.6.2
1257
1258- Fix/guard against unintended inclusion of some files in npm published package
1259 due to <https://github.com/isaacs/npm/issues/2144>
1260
1261
1262## 0.6.1
1263
1264- Internal: starting jsstyle usage.
1265- Internal: add .npmignore. Previous packages had reams of bunyan crud in them.
1266
1267
1268## 0.6.0
1269
1270- Add 'pid' automatic log record field.
1271
1272
1273## 0.5.3
1274
1275- Add 'client_req' (HTTP client request) standard formatting in `bunyan` CLI
1276 default output.
1277- Improve `bunyan` CLI default output to include *all* log record keys. Unknown keys
1278 are either included in the first line parenthetical (if short) or in the indented
1279 subsequent block (if long or multiline).
1280
1281
1282## 0.5.2
1283
1284- [issue #3] More type checking of `new Logger(...)` and `log.child(...)`
1285 options.
1286- Start a test suite.
1287
1288
1289## 0.5.1
1290
1291- [issue #2] Add guard on `JSON.stringify`ing of log records before emission.
1292 This will prevent `log.info` et al throwing on record fields that cannot be
1293 represented as JSON. An error will be printed on stderr and a clipped log
1294 record emitted with a 'bunyanMsg' key including error details. E.g.:
1295
1296 bunyan: ERROR: could not stringify log record from /Users/trentm/tm/node-bunyan/examples/unstringifyable.js:12: TypeError: Converting circular structure to JSON
1297 {
1298 "name": "foo",
1299 "hostname": "banana.local",
1300 "bunyanMsg": "bunyan: ERROR: could not stringify log record from /Users/trentm/tm/node-bunyan/examples/unstringifyable.js:12: TypeError: Converting circular structure to JSON",
1301 ...
1302
1303 Some timing shows this does effect log speed:
1304
1305 $ node tools/timeguard.js # before
1306 Time try/catch-guard on JSON.stringify:
1307 - log.info: 0.07365ms per iteration
1308 $ node tools/timeguard.js # after
1309 Time try/catch-guard on JSON.stringify:
1310 - log.info: 0.07368ms per iteration
1311
1312
1313## 0.5.0
1314
1315- Use 10/20/... instead of 1/2/... for level constant values. Ostensibly this
1316 allows for intermediary levels from the defined "trace/debug/..." set.
1317 However, that is discouraged. I'd need a strong user argument to add
1318 support for easily using alternative levels. Consider using a separate
1319 JSON field instead.
1320- s/service/name/ for Logger name field. "service" is unnecessarily tied
1321 to usage for a service. No need to differ from log4j Logger "name".
1322- Add `log.level(...)` and `log.levels(...)` API for changing logger stream
1323 levels.
1324- Add `TRACE|DEBUG|INFO|WARN|ERROR|FATAL` level constants to exports.
1325- Add `log.info(err)` special case for logging an `Error` instance. For
1326 example `log.info(new TypeError("boom")` will produce:
1327
1328 ...
1329 "err": {
1330 "message": "boom",
1331 "name": "TypeError",
1332 "stack": "TypeError: boom\n at Object.<anonymous> ..."
1333 },
1334 "msg": "boom",
1335 ...
1336
1337
1338## 0.4.0
1339
1340- Add `new Logger({src: true})` config option to have a 'src' attribute be
1341 automatically added to log records with the log call source info. Example:
1342
1343 "src": {
1344 "file": "/Users/trentm/tm/node-bunyan/examples/src.js",
1345 "line": 20,
1346 "func": "Wuzzle.woos"
1347 },
1348
1349
1350## 0.3.0
1351
1352- `log.child(options[, simple])` Added `simple` boolean arg. Set `true` to
1353 assert that options only add fields (no config changes). Results in a 10x
1354 speed increase in child creation. See "tools/timechild.js". On my Mac,
1355 "fast child" creation takes about 0.001ms. IOW, if your app is dishing
1356 10,000 req/s, then creating a log child for each request will take
1357 about 1% of the request time.
1358- `log.clone` -> `log.child` to better reflect the relationship: streams and
1359 serializers are inherited. Streams can't be removed as part of the child
1360 creation. The child doesn't own the parent's streams (so can't close them).
1361- Clean up Logger creation. The goal here was to ensure `log.child` usage
1362 is fast. TODO: measure that.
1363- Add `Logger.stdSerializers.err` serializer which is necessary to get good
1364 Error object logging with node 0.6 (where core Error object properties
1365 are non-enumerable).
1366
1367
1368## 0.2.0
1369
1370- Spec'ing core/recommended log record fields.
1371- Add `LOG_VERSION` to exports.
1372- Improvements to request/response serializations.
1373
1374
1375## 0.1.0
1376
1377First release.