프로젝트

일반

사용자정보

통계
| 개정판:

root / HServer / 00.Server / 00.Program / node_modules / bunyan / CHANGES.md

이력 | 보기 | 이력해설 | 다운로드 (44.8 KB)

1
# bunyan Changelog
2

    
3
Known issues:
4

    
5
- [issue #58] Can't install to a dir with spaces. This is [this node-gyp
6
  bug](https://github.com/TooTallNate/node-gyp/issues/65).
7

    
8
## not yet released
9

    
10
(nothing yet)
11

    
12

    
13
## 1.8.12
14

    
15
- [issue #444] Fix the `bunyan` CLI to not duplicate the "HTTP/1.1 ..." status
16
  line when serializing a "res" field.
17

    
18

    
19
## 1.8.11
20

    
21
- [issue #504] The `bunyan` 1.x CLI adds a `Host: $client_req.address[:$client_req.port]`
22
  header when rendering a `client_req` field in a log record. Fix that here to:
23
  (a) not add it if `client_req.headers` already includes a host header; and
24
  (b) not include the given `port` if it is 80 or 443 (*assuming* that is the
25
  default port.
26
  Note: `bunyan` 2.x CLI will stop adding this Host header because it is a guess
27
  that can be wrong and misleading.
28

    
29

    
30
## 1.8.10
31

    
32
- Ensure that `bunyan` errors out if attempting to use `-p PID` and
33
  file args at the same time.
34

    
35

    
36
## 1.8.9
37

    
38
- [pull #409, issue #246] Revert a change added to the `bunyan` CLI version
39
  1.0.1 where `SIGINT` was ignored, such that Ctrl+C could not be used to
40
  terminate bunyan. (By @zbjornson and @davepacheco.)
41
- [pull #469] Fix a strict mode (`"use strict;"`) error in some versions of
42
  Safari.
43

    
44

    
45
## 1.8.8
46

    
47
- Fix breakage due to a silly last minute "fix 'make check'".
48

    
49

    
50
## 1.8.7
51

    
52
Note: *Bad release.* Use 1.8.8 or later.
53

    
54
- [issue #484] Fix breakage due to #474 in previous release.
55

    
56

    
57
## 1.8.6
58

    
59
Note: *Bad release.* Use 1.8.7 or later.
60

    
61
- [issue #474] Bunyan's `safeCycles` is too slow when logging large objects.
62

    
63

    
64
## 1.8.5
65

    
66
- [issue #401] Improved performance when using disabled log levels.
67

    
68

    
69
## 1.8.4
70

    
71
- [issue #454] Fix `src` usage with node v7.
72

    
73

    
74
## 1.8.3
75

    
76
- [issue #450] Fix `log.info(null)` crash that resulted from #426 in v1.8.2.
77

    
78

    
79
## 1.8.2
80

    
81
- [issue #449] Bump dtrace-provider dep to 0.7.0 to help avoid deprecation
82
  warnings with node v6 in some cases.
83
- [issue #426] Ensure `log.info({err: err})` results in a "msg" value, just
84
  like `log.info(err)`.
85

    
86

    
87
## 1.8.1
88

    
89
- [pull #386] Fix bad bug in rotation that could cause a crash with
90
  error message "cannot start a rotation when already rotating"
91
  (by Frankie O'Rourke). The bug was introduced in 1.8.0.
92

    
93

    
94
## 1.8.0
95

    
96
Note: *Bad release.* An addition in this release broke 'rotating-file' usage.
97
Use 1.8.1 or later.
98

    
99
- [issue #370] Fix `bunyan -p ...` (i.e. DTrace integration) on node
100
  4.x and 5.x.
101
- [issue #329, pull #330] Update the 'rotating-file' stream to do a file
102
  rotation on initialization if the mtime on the file path indicates the
103
  last rotation time was missed -- i.e. if the app wasn't running at the
104
  time. (by Paul Milham.)
105

    
106

    
107
## 1.7.1
108

    
109
- [issue #332, pull #355] Ensure stream for type='stream' stream is a writable
110
  stream. (By Michael Nisi.)
111

    
112
- [issue #344] Fix "rotating-file" Bunyan streams to not miss rotations when configured
113
  for a period greater than approximately 25 days. Before this there was an issue
114
  where periods greater than node.js's maximum `setTimeout` length would fail to rotate.
115
  (By Martijn Schrage.)
116

    
117
- [issue #234, pull #345] Improve `bunyan` CLI rendering of "res" field
118
  HTTP responses to not show two blank lines for an empty body.
119
  (By Michael Nisi.)
120

    
121

    
122
## 1.7.0
123

    
124
- [pull #311, #302, #310] Improve the runtime environment detection to fix
125
  running under [NW.js](http://nwjs.io/). Contributions by Adam Lynch, Jeremy
126
  Ruppel, and Aleksey Timchenko.
127

    
128
- [pull #318] Add `reemitErrorEvents` optional boolean for streams added to a
129
  Bunyan logger to control whether an "error" event on the stream will be
130
  re-emitted on the `Logger` instance.
131

    
132
        var log = bunyan.createLogger({
133
            name: 'foo',
134
            streams: [
135
                {
136
                    type: 'raw',
137
                    stream: new MyCustomStream(),
138
                    reemitErrorEvents: true
139
                }
140
            ]
141
        });
142

    
143
  Before this change, "error" events were re-emitted on [`file`
144
  streams](https://github.com/trentm/node-bunyan#stream-type-file) only. The new
145
  behaviour is as follows:
146

    
147
    - `reemitErrorEvents` not specified: `file` streams will re-emit error events
148
      on the Logger instance.
149
    - `reemitErrorEvents: true`: error events will be re-emitted on the Logger
150
      for any stream with a `.on()` function -- which includes file streams,
151
      process.stdout/stderr, and any object that inherits from EventEmitter.
152
    - `reemitErrorEvents: false`: error events will not be re-emitted for any
153
      streams.
154

    
155
  Dev Note: Bunyan `Logger` objects don't currently have a `.close()` method
156
  in which registered error event handlers can be *un*registered. That means
157
  that a (presumably rare) situation where code adds dozens of Bunyan Logger
158
  streams to, e.g. process.stdout, and with `reemitErrorEvents: true`, could
159
  result in leaking Logger objects.
160

    
161
  Original work for allowing "error" re-emitting on non-file streams is
162
  by Marc Udoff in pull #318.
163

    
164

    
165
## 1.6.0
166

    
167
- [pull #304, issue #245] Use [Moment.js][momentjs.com] library to handle
168
  `bunyan` CLI time formatting in some cases, especially to fix display of
169
  local time. It is now required for local time formatting (i.e. `bunyan -L`
170
  or `bunyan --time local`). (By David M. Lee.)
171

    
172
- [pull #252] Fix errant `client_res={}` in `bunyan` CLI rendering, and avoid
173
  extra newlines in `client_req` rendering in some cases. (By Thomas Heymann.)
174

    
175
- [pull #291, issue #303] Fix `LOG.child(...)` to *not* override the "hostname"
176
  field of the parent. A use case is when one manually sets "hostname" to
177
  something other than `os.hostname()`. (By github.com/Cactusbone.)
178

    
179
- [issue #325] Allow one to set `level: 0` in `createLogger` to turn on
180
  logging for all levels. (Adapted from #336 by github.com/sometimesalready.)
181

    
182
- Add guards (to `resolveLevel`) so that all "level" values are validated.
183
  Before this, a bogus level like "foo" or -12 or `['some', 'array']` would
184
  silently be accepted -- with undefined results.
185

    
186
- Doc updates for #340 and #305.
187

    
188
- Update `make test` to test against node 5, 4, 0.12 and 0.10.
189

    
190

    
191
## 1.5.1
192

    
193
- [issue #296] Fix `src: true`, which was broken in v1.5.0.
194

    
195

    
196
## 1.5.0
197

    
198
Note: *Bad release.* The addition of `'use strict';` broke Bunyan's `src: true`
199
feature. Use 1.5.1 instead.
200

    
201
- [pull #236, issue #231, issue #223] Fix strict mode in the browser.
202
- [pull #282, issue #213] Fixes bunyan to work with webpack. By Denis Izmaylov.
203
- [pull #294] Update to dtrace-provider 0.6 to fix with node 4.0 and io.js 3.0.
204
- Dropped support for 0.8 (can't install deps easily anymore for running
205
  test suite). Bump to a recent iojs version for testing.
206

    
207

    
208
## 1.4.0
209

    
210
(Bumping minor ver b/c I'm wary of dtrace-provider changes. :)
211

    
212
- [issue #258, pull #259] Update to dtrace-provider 0.5 to fix
213
  install and tests on recent io.js versions.
214
- safe-json-stringify@1.0.3 changed output, breaking some tests. Fix those.
215

    
216

    
217
## 1.3.6
218

    
219
- [issue #244] Make `bunyan` defensive on `res.header=null`.
220

    
221

    
222
## 1.3.5
223

    
224
- [issue #233] Make `bunyan` defensive on res.header as a boolean.
225
- [issue #242] Make `bunyan` defensive on err.stack not being a string.
226

    
227

    
228
## 1.3.4
229

    
230
- Allow `log.child(...)` to work even if the logger is a *sub-class*
231
  of Bunyan's Logger class.
232
- [issue #219] Hide 'source-map-support' require from browserify.
233
- [issue #218] Reset `haveNonRawStreams` on `<logger>.addStream`.
234

    
235

    
236
## 1.3.3
237

    
238
- [pull #127] Update to dtrace-provider 0.4.0, which gives io.js 1.x support
239
  for dtrace-y parts of Bunyan.
240

    
241

    
242
## 1.3.2
243

    
244
- [pull #182] Fallback to using the optional 'safe-json-stringify' module
245
  if `JSON.stringify` throws -- possibly with an enumerable property
246
  getter than throws. By Martin Gausby.
247

    
248

    
249
## 1.3.1
250

    
251
- Export `bunyan.RotatingFileStream` which is needed if one wants to
252
  customize it. E.g. see issue #194.
253

    
254
- [pull #122] Source Map support for caller line position for [the "src"
255
  field](https://github.com/trentm/node-bunyan#src). This could be interesting
256
  for [CoffeeScript](http://coffeescript.org/documentation/docs/sourcemap.html)
257
  users of Bunyan. By Manuel Schneider.
258

    
259
- [issue #164] Ensure a top-level `level` given in `bunyan.createLogger`
260
  is *used* for given `streams`. For example, ensure that the following
261
  results in the stream having a DEBUG level:
262

    
263
        var log = bunyan.createLogger({
264
            name: 'foo',
265
            level: 'debug',
266
            streams: [
267
                {
268
                    path: '/var/tmp/foo.log'
269
                }
270
            ]
271
        });
272

    
273
  This was broken in the 1.0.1 release. Between that release and 1.3.0
274
  the "/var/tmp/foo.log" stream would be at the INFO level (Bunyan's
275
  default level).
276

    
277

    
278
## 1.3.0
279

    
280
- [issue #103] `bunyan -L` (or `bunyan --time local`) to show local time.
281
  Bunyan log records store `time` in UTC time. Sometimes it is convenient
282
  to display in local time.
283

    
284
- [issue #205] Fix the "The Bunyan CLI crashed!" checking to properly warn of
285
  the common failure case when `-c CONDITION` is being used.
286

    
287

    
288
## 1.2.4
289

    
290
- [issue #210] Export `bunyan.nameFromLevel` and `bunyan.levelFromName`. It can
291
  be a pain for custom streams to have to reproduce that.
292

    
293
- [issue #100] Gracefully handle the case of an unbound
294
  `Logger.{info,debug,...}` being used for logging, e.g.:
295

    
296
        myEmittingThing.on('data', log.info)
297

    
298
  Before this change, bunyan would throw. Now it emits a warning to stderr
299
  *once*, and then silently ignores those log attempts, e.g.:
300

    
301
        bunyan usage error: /Users/trentm/tm/node-bunyan/foo.js:12: attempt to log with an unbound log method: `this` is: { _events: { data: [Function] } }
302

    
303

    
304
## 1.2.3
305

    
306
- [issue #184] Fix log rotation for rotation periods > ~25 days. Before this
307
  change, a rotation period longer than this could hit [the maximum setTimeout
308
  delay in node.js](https://github.com/joyent/node/issues/8656). By Daniel Juhl.
309

    
310

    
311
## 1.2.2
312

    
313
- Drop the guard that a bunyan Logger level must be between TRACE (10)
314
  and FATAL (60), inclusive. This allows a trick of setting the level
315
  to `FATAL + 1` to turn logging off. While the standard named log levels are
316
  the golden path, then intention was not to get in the way of using
317
  other level numbers.
318

    
319

    
320
## 1.2.1
321

    
322
- [issue #178, #181] Get at least dtrace-provider 0.3.1 for
323
  optionalDependencies to get a fix for install with decoupled npm (e.g. with
324
  homebrew's node and npm).
325

    
326

    
327
## 1.2.0
328

    
329
- [issue #157] Restore dtrace-provider as a dependency (in
330
  "optionalDependencies").
331

    
332
  Dtrace-provider version 0.3.0 add build sugar that should eliminate the
333
  problems from older versions:
334
  The build is not attempted on Linux and Windows. The build spew is
335
  *not* emitted by default (use `V=1 npm install` to see it); instead a
336
  short warning is emitted if the build fails.
337

    
338
  Also, importantly, the new dtrace-provider fixes working with node
339
  v0.11/0.12.
340

    
341

    
342
## 1.1.3
343

    
344
- [issue #165] Include extra `err` fields in `bunyan` CLI output. Before
345
  this change only the fields part of the typical node.js error stack
346
  (err.stack, err.message, err.name) would be emitted, even though
347
  the Bunyan *library* would typically include err.code and err.signal
348
  in the raw JSON log record.
349

    
350

    
351
## 1.1.2
352

    
353
- Fix a breakage in `log.info(err)` on a logger with no serializers.
354

    
355

    
356
## 1.1.1
357

    
358
Note: *Bad release.* It breaks `log.info(err)` on a logger with no serializers.
359
Use version 1.1.2.
360

    
361
- [pull #168] Fix handling of `log.info(err)` to use the `log` Logger's `err`
362
  serializer if it has one, instead of always using the core Bunyan err
363
  serializer. (By Mihai Tomescu.)
364

    
365

    
366
## 1.1.0
367

    
368
- [issue #162] Preliminary support for [browserify](http://browserify.org/).
369
  See [the section in the README](../README.md#browserify).
370

    
371

    
372
## 1.0.1
373

    
374
- [issues #105, #138, #151] Export `<Logger>.addStream(...)` and
375
  `<Logger>.addSerializers(...)` to be able to add them after Logger creation.
376
  Thanks @andreineculau!
377

    
378
- [issue #159] Fix bad handling in construtor guard intending to allow
379
  creation without "new": `var log = Logger(...)`. Thanks @rmg!
380

    
381
- [issue #156] Smaller install size via .npmignore file.
382

    
383
- [issue #126, #161] Ignore SIGINT (Ctrl+C) when processing stdin. `...| bunyan`
384
  should expect the preceding process in the pipeline to handle SIGINT. While
385
  it is doing so, `bunyan` should continue to process any remaining output.
386
  Thanks @timborodin and @jnordberg!
387

    
388
- [issue #160] Stop using ANSI 'grey' in `bunyan` CLI output, because of the
389
  problems that causes with Solarized Dark themes (see
390
  <https://github.com/altercation/solarized/issues/220>).
391

    
392

    
393
## 1.0.0
394

    
395
- [issue #87] **Backward incompatible change to `-c CODE`** improving
396
  performance by over 10x (good!), with a backward incompatible change to
397
  semantics (unfortunate), and adding some sugar (good!).
398

    
399
  The `-c CODE` implementation was changed to use a JS function for processing
400
  rather than `vm.runInNewContext`. The latter was specatularly slow, so
401
  won't be missed. Unfortunately this does mean a few semantic differences in
402
  the `CODE`, the most noticeable of which is that **`this` is required to
403
  access the object fields:**
404

    
405
        # Bad. Works with bunyan 0.x but not 1.x.
406
        $ bunyan -c 'pid === 123' foo.log
407
        ...
408

    
409
        # Good. Works with all versions of bunyan
410
        $ bunyan -c 'this.pid === 123' foo.log
411
        ...
412

    
413
  The old behaviour of `-c` can be restored with the `BUNYAN_EXEC=vm`
414
  environment variable:
415

    
416
        $ BUNYAN_EXEC=vm bunyan -c 'pid === 123' foo.log
417
        ...
418

    
419
  Some sugar was also added: the TRACE, DEBUG, ... constants are defined, so
420
  one can:
421

    
422
        $ bunyan -c 'this.level >= ERROR && this.component === "http"' foo.log
423
        ...
424

    
425
  And example of the speed improvement on a 10 MiB log example:
426

    
427
        $ time BUNYAN_EXEC=vm bunyan -c 'this.level === ERROR' big.log | cat >slow
428

    
429
        real    0m6.349s
430
        user    0m6.292s
431
        sys    0m0.110s
432

    
433
        $ time bunyan -c 'this.level === ERROR' big.log | cat >fast
434

    
435
        real    0m0.333s
436
        user    0m0.303s
437
        sys    0m0.028s
438

    
439
  The change was courtesy Patrick Mooney (https://github.com/pfmooney). Thanks!
440

    
441
- Add `bunyan -0 ...` shortcut for `bunyan -o bunyan ...`.
442

    
443
- [issue #135] **Backward incompatible.** Drop dtrace-provider even from
444
  `optionalDependencies`. Dtrace-provider has proven a consistent barrier to
445
  installing bunyan, because it is a binary dep. Even as an *optional* dep it
446
  still caused confusion and install noise.
447

    
448
  Users of Bunyan on dtrace-y platforms (SmartOS, Mac, Illumos, Solaris) will
449
  need to manually `npm install dtrace-provider` themselves to get [Bunyan's
450
  dtrace support](https://github.com/trentm/node-bunyan#runtime-log-snooping-via-dtrace)
451
  to work. If not installed, bunyan should stub it out properly.
452

    
453

    
454

    
455
## 0.23.1
456

    
457
- [pull #125, pull #97, issue #73] Unref rotating-file timeout which was
458
  preventing processes from exiting (by https://github.com/chakrit and
459
  https://github.com/glenn-murray-bse). Note: this only fixes the issue
460
  for node 0.10 and above.
461

    
462

    
463
## 0.23.0
464

    
465
- [issue #139] Fix `bunyan` crash on a log record with `res.header` that is an
466
  object. A side effect of this improvement is that a record with `res.statusCode`
467
  but no header info will render a response block, for example:
468

    
469
        [2012-08-08T10:25:47.637Z]  INFO: my-service/12859 on my-host: some message (...)
470
            ...
471
            --
472
            HTTP/1.1 200 OK
473
            --
474
            ...
475

    
476
- [pull #42] Fix `bunyan` crash on a log record with `req.headers` that is a *string*
477
  (by https://github.com/aexmachina).
478

    
479
- Drop node 0.6 support. I can't effectively `npm install` with a node 0.6
480
  anymore.
481

    
482
- [issue #85] Ensure logging a non-object/non-string doesn't throw (by
483
  https://github.com/mhart). This changes fixes:
484

    
485
        log.info(<bool>)     # TypeError: Object.keys called on non-object
486
        log.info(<function>) # "msg":"" (instead of wanted "msg":"[Function]")
487
        log.info(<array>)    # "msg":"" (instead of wanted "msg":util.format(<array>))
488

    
489

    
490
## 0.22.3
491

    
492
- Republish the same code to npm.
493

    
494

    
495
## 0.22.2
496

    
497
Note: Bad release. The published package in the npm registry got corrupted. Use 0.22.3 or later.
498

    
499
- [issue #131] Allow `log.info(<number>)` and, most importantly, don't crash on that.
500

    
501
- Update 'mv' optional dep to latest.
502

    
503

    
504
## 0.22.1
505

    
506
- [issue #111] Fix a crash when attempting to use `bunyan -p` on a platform without
507
  dtrace.
508

    
509
- [issue #101] Fix a crash in `bunyan` rendering a record with unexpected "res.headers".
510

    
511

    
512
## 0.22.0
513

    
514
- [issue #104] `log.reopenFileStreams()` convenience method to be used with external log
515
  rotation.
516

    
517

    
518
## 0.21.4
519

    
520
- [issue #96] Fix `bunyan` to default to paging (with `less`) by default in node 0.10.0.
521
  The intention has always been to default to paging for node >=0.8.
522

    
523

    
524
## 0.21.3
525

    
526
- [issue #90] Fix `bunyan -p '*'` breakage in version 0.21.2.
527

    
528

    
529
## 0.21.2
530

    
531
**Note: Bad release. The switchrate change below broke `bunyan -p '*'` usage
532
(see issue #90). Use 0.21.3 or later.**
533

    
534
- [issue #88] Should be able to efficiently combine "-l" with "-p *".
535

    
536
- Avoid DTrace buffer filling up, e.g. like this:
537

    
538
        $ bunyan -p 42241 > /tmp/all.log
539
        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
540
        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
541
        dtrace: 138 drops on CPU 4
542
        ...
543

    
544
  From Bryan: "the DTrace buffer is filling up because the string size is so
545
  large... by increasing the switchrate, you're increasing the rate at
546
  which that buffer is emptied."
547

    
548

    
549
## 0.21.1
550

    
551
- [pull #83] Support rendering 'client_res' key in bunyan CLI (by
552
  github.com/mcavage).
553

    
554

    
555
## 0.21.0
556

    
557
- 'make check' clean, 4-space indenting. No functional change here, just
558
  lots of code change.
559
- [issue #80, #82] Drop assert that broke using 'rotating-file' with
560
  a default `period` (by github.com/ricardograca).
561

    
562

    
563
## 0.20.0
564

    
565
- [Slight backward incompatibility] Fix serializer bug introduced in 0.18.3
566
  (see below) to only apply serializers to log records when appropriate.
567

    
568
  This also makes a semantic change to custom serializers. Before this change
569
  a serializer function was called for a log record key when that value was
570
  truth-y. The semantic change is to call the serializer function as long
571
  as the value is not `undefined`. That means that a serializer function
572
  should handle falsey values such as `false` and `null`.
573

    
574
- Update to latest 'mv' dep (required for rotating-file support) to support
575
  node v0.10.0.
576

    
577

    
578
## 0.19.0
579

    
580
**WARNING**: This release includes a bug introduced in bunyan 0.18.3 (see
581
below). Please upgrade to bunyan 0.20.0.
582

    
583
- [Slight backward incompatibility] Change the default error serialization
584
  (a.k.a. `bunyan.stdSerializers.err`) to *not* serialize all additional
585
  attributes of the given error object. This is an open door to unsafe logging
586
  and logging should always be safe. With this change, error serialization
587
  will log these attributes: message, name, stack, code, signal. The latter
588
  two are added because some core node APIs include those fields (e.g.
589
  `child_process.exec`).
590

    
591
  Concrete examples where this has hurt have been the "domain" change
592
  necessitating 0.18.3 and a case where
593
  [node-restify](https://github.com/mcavage/node-restify) uses an error object
594
  as the response object. When logging the `err` and `res` in the same log
595
  statement (common for restify audit logging), the `res.body` would be JSON
596
  stringified as '[Circular]' as it had already been emitted for the `err` key.
597
  This results in a WTF with the bunyan CLI because the `err.body` is not
598
  rendered.
599

    
600
  If you need the old behaviour back you will need to do this:
601

    
602
        var bunyan = require('bunyan');
603
        var errSkips = {
604
            // Skip domain keys. `domain` especially can have huge objects that can
605
            // OOM your app when trying to JSON.stringify.
606
            domain: true,
607
            domain_emitter: true,
608
            domain_bound: true,
609
            domain_thrown: true
610
        };
611
        bunyan.stdSerializers.err = function err(err) {
612
           if (!err || !err.stack)
613
               return err;
614
           var obj = {
615
               message: err.message,
616
               name: err.name,
617
               stack: getFullErrorStack(err)
618
           }
619
           Object.keys(err).forEach(function (k) {
620
               if (err[k] !== undefined && !errSkips[k]) {
621
                   obj[k] = err[k];
622
               }
623
           });
624
           return obj;
625
         };
626

    
627
- "long" and "bunyan" output formats for the CLI. `bunyan -o long` is the default
628
  format, the same as before, just called "long" now instead of the cheesy "paul"
629
  name. The "bunyan" output format is the same as "json-0", just with a more
630
  convenient name.
631

    
632

    
633
## 0.18.3
634

    
635
**WARNING**: This release introduced a bug such that all serializers are
636
applied to all log records even if the log record did not contain the key
637
for that serializer. If a logger serializer function does not handle
638
being given `undefined`, then you'll get warnings like this on stderr:
639

    
640
    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: ...
641
        at Object.bunyan.createLogger.serializers.foo (.../myapp.js:20:15)
642
        at Logger._applySerializers (.../lib/bunyan.js:644:46)
643
        at Array.forEach (native)
644
        at Logger._applySerializers (.../lib/bunyan.js:640:33)
645
        ...
646

    
647
and the following junk in written log records:
648

    
649
    "foo":"(Error in Bunyan log "foo" serializer broke field. See stderr for details.)"
650

    
651
Please upgrade to bunyan 0.20.0.
652

    
653

    
654
- Change the `bunyan.stdSerializers.err` serializer for errors to *exclude*
655
  [the "domain*" keys](http://nodejs.org/docs/latest/api/all.html#all_additions_to_error_objects).
656
  `err.domain` will include its assigned members which can arbitrarily large
657
  objects that are not intended for logging.
658

    
659
- Make the "dtrace-provider" dependency optional. I hate to do this, but
660
  installing bunyan on Windows is made very difficult with this as a required
661
  dep.  Even though "dtrace-provider" stubs out for non-dtrace-y platforms,
662
  without a compiler and Python around, node-gyp just falls over.
663

    
664

    
665
## 0.18.2
666

    
667
- [pull #67] Remove debugging prints in rotating-file support.
668
  (by github.com/chad3814).
669
- Update to dtrace-provider@0.2.7.
670

    
671

    
672
## 0.18.1
673

    
674
- Get the `bunyan` CLI to **not** automatically page (i.e. pipe to `less`)
675
  if stdin isn't a TTY, or if following dtrace probe output (via `-p PID`),
676
  or if not given log file arguments.
677

    
678

    
679
## 0.18.0
680

    
681
- Automatic paging support in the `bunyan` CLI (similar to `git log` et al).
682
  IOW, `bunyan` will open your pager (by default `less`) and pipe rendered
683
  log output through it. A main benefit of this is getting colored logs with
684
  a pager without the pain. Before you had to explicit use `--color` to tell
685
  bunyan to color output when the output was not a TTY:
686

    
687
        bunyan foo.log --color | less -R        # before
688
        bunyan foo.log                          # now
689

    
690
  Disable with the `--no-pager` option or the `BUNYAN_NO_PAGER=1` environment
691
  variable.
692

    
693
  Limitations: Only supported for node >=0.8. Windows is not supported (at
694
  least not yet).
695

    
696
- Switch test suite to nodeunit (still using a node-tap'ish API via
697
  a helper).
698

    
699

    
700
## 0.17.0
701

    
702
- [issue #33] Log rotation support:
703

    
704
        var bunyan = require('bunyan');
705
        var log = bunyan.createLogger({
706
            name: 'myapp',
707
            streams: [{
708
                type: 'rotating-file',
709
                path: '/var/log/myapp.log',
710
                count: 7,
711
                period: 'daily'
712
            }]
713
        });
714

    
715

    
716
- Tweak to CLI default pretty output: don't special case "latency" field.
717
  The special casing was perhaps nice, but less self-explanatory.
718
  Before:
719

    
720
        [2012-12-27T21:17:38.218Z]  INFO: audit/45769 on myserver: handled: 200 (15ms, audit=true, bar=baz)
721
          GET /foo
722
          ...
723

    
724
  After:
725

    
726
        [2012-12-27T21:17:38.218Z]  INFO: audit/45769 on myserver: handled: 200 (audit=true, bar=baz, latency=15)
727
          GET /foo
728
          ...
729

    
730
- *Exit* CLI on EPIPE, otherwise we sit there useless processing a huge log
731
  file with, e.g.  `bunyan huge.log | head`.
732

    
733

    
734
## 0.16.8
735

    
736
- Guards on `-c CONDITION` usage to attempt to be more user friendly.
737
  Bogus JS code will result in this:
738

    
739
        $ bunyan portal.log -c 'this.req.username==boo@foo'
740
        bunyan: error: illegal CONDITION code: SyntaxError: Unexpected token ILLEGAL
741
          CONDITION script:
742
            Object.prototype.TRACE = 10;
743
            Object.prototype.DEBUG = 20;
744
            Object.prototype.INFO = 30;
745
            Object.prototype.WARN = 40;
746
            Object.prototype.ERROR = 50;
747
            Object.prototype.FATAL = 60;
748
            this.req.username==boo@foo
749
          Error:
750
            SyntaxError: Unexpected token ILLEGAL
751
                at new Script (vm.js:32:12)
752
                at Function.Script.createScript (vm.js:48:10)
753
                at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:465:27)
754
                at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16)
755
                at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3)
756
                at Module._compile (module.js:449:26)
757
                at Object.Module._extensions..js (module.js:467:10)
758
                at Module.load (module.js:356:32)
759
                at Function.Module._load (module.js:312:12)
760
                at Module.runMain (module.js:492:10)
761

    
762
  And all CONDITION scripts will be run against a minimal valid Bunyan
763
  log record to ensure they properly guard against undefined values
764
  (at least as much as can reasonably be checked). For example:
765

    
766
        $ bunyan portal.log -c 'this.req.username=="bob"'
767
        bunyan: error: CONDITION code cannot safely filter a minimal Bunyan log record
768
          CONDITION script:
769
            Object.prototype.TRACE = 10;
770
            Object.prototype.DEBUG = 20;
771
            Object.prototype.INFO = 30;
772
            Object.prototype.WARN = 40;
773
            Object.prototype.ERROR = 50;
774
            Object.prototype.FATAL = 60;
775
            this.req.username=="bob"
776
          Minimal Bunyan log record:
777
            {
778
              "v": 0,
779
              "level": 30,
780
              "name": "name",
781
              "hostname": "hostname",
782
              "pid": 123,
783
              "time": 1355514346206,
784
              "msg": "msg"
785
            }
786
          Filter error:
787
            TypeError: Cannot read property 'username' of undefined
788
                at bunyan-condition-0:7:9
789
                at Script.Object.keys.forEach.(anonymous function) [as runInNewContext] (vm.js:41:22)
790
                at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:477:18)
791
                at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16)
792
                at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3)
793
                at Module._compile (module.js:449:26)
794
                at Object.Module._extensions..js (module.js:467:10)
795
                at Module.load (module.js:356:32)
796
                at Function.Module._load (module.js:312:12)
797
                at Module.runMain (module.js:492:10)
798

    
799
  A proper way to do that condition would be:
800

    
801
        $ bunyan portal.log -c 'this.req && this.req.username=="bob"'
802

    
803

    
804

    
805
## 0.16.7
806

    
807
- [issue #59] Clear a possibly interrupted ANSI color code on signal
808
  termination.
809

    
810

    
811
## 0.16.6
812

    
813
- [issue #56] Support `bunyan -p NAME` to dtrace all PIDs matching 'NAME' in
814
  their command and args (using `ps -A -o pid,command | grep NAME` or, on SunOS
815
  `pgrep -lf NAME`). E.g.:
816

    
817
        bunyan -p myappname
818

    
819
  This is useful for usage of node's [cluster
820
  module](http://nodejs.org/docs/latest/api/all.html#all_cluster) where you'll
821
  have multiple worker processes.
822

    
823

    
824
## 0.16.5
825

    
826
- Allow `bunyan -p '*'` to capture bunyan dtrace probes from **all** processes.
827
- issue #55: Add support for `BUNYAN_NO_COLOR` environment variable to
828
  turn off all output coloring. This is still overridden by the `--color`
829
  and `--no-color` options.
830

    
831

    
832
## 0.16.4
833

    
834
- issue #54: Ensure (again, see 0.16.2) that stderr from the dtrace child
835
  process (when using `bunyan -p PID`) gets through. There had been a race
836
  between exiting bunyan and the flushing of the dtrace process' stderr.
837

    
838

    
839
## 0.16.3
840

    
841
- Drop 'trentm-dtrace-provider' fork dep now that
842
  <https://github.com/chrisa/node-dtrace-provider/pull/24> has been resolved.
843
  Back to dtrace-provider.
844

    
845

    
846
## 0.16.2
847

    
848
- Ensure that stderr from the dtrace child process (when using `bunyan -p PID`)
849
  gets through. The `pipe` usage wasn't working on SmartOS. This is important
850
  to show the user if they need to 'sudo'.
851

    
852

    
853
## 0.16.1
854

    
855
- Ensure that a possible dtrace child process (with using `bunyan -p PID`) is
856
  terminated on signal termination of the bunyan CLI (at least for SIGINT,
857
  SIGQUIT, SIGTERM, SIGHUP).
858

    
859

    
860
## 0.16.0
861

    
862
- Add `bunyan -p PID` support. This is a convenience wrapper that effectively
863
  calls:
864

    
865
        dtrace -x strsize=4k -qn 'bunyan$PID:::log-*{printf("%s", copyinstr(arg0))}' | bunyan
866

    
867

    
868
## 0.15.0
869

    
870
- issue #48: Dtrace support! The elevator pitch is you can watch all logging
871
  from all Bunyan-using process with something like this:
872

    
873
        dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%d: %s: %s", pid, probefunc, copyinstr(arg0))}'
874

    
875
  And this can include log levels *below* what the service is actually configured
876
  to log. E.g. if the service is only logging at INFO level and you need to see
877
  DEBUG log messages, with this you can. Obviously this only works on dtrace-y
878
  platforms: Illumos derivatives of SunOS (e.g. SmartOS, OmniOS), Mac, FreeBSD.
879

    
880
  Or get the bunyan CLI to render logs nicely:
881

    
882
        dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%s", copyinstr(arg0))}' | bunyan
883

    
884
  See <https://github.com/trentm/node-bunyan#dtrace-support> for details. By
885
  Bryan Cantrill.
886

    
887

    
888
## 0.14.6
889

    
890
- Export `bunyan.safeCycles()`. This may be useful for custom `type == "raw"`
891
  streams that may do JSON stringification of log records themselves. Usage:
892

    
893
        var str = JSON.stringify(rec, bunyan.safeCycles());
894

    
895
- [issue #49] Allow a `log.child()` to specify the level of inherited streams.
896
  For example:
897

    
898
        # Before
899
        var childLog = log.child({...});
900
        childLog.level('debug');
901

    
902
        # After
903
        var childLog = log.child({..., level: 'debug'});
904

    
905
- Improve the Bunyan CLI crash message to make it easier to provide relevant
906
  details in a bug report.
907

    
908

    
909
## 0.14.5
910

    
911
- Fix a bug in the long-stack-trace error serialization added in 0.14.4. The
912
  symptom:
913

    
914
        bunyan@0.14.4: .../node_modules/bunyan/lib/bunyan.js:1002
915
          var ret = ex.stack || ex.toString();
916
                      ^
917
        TypeError: Cannot read property 'stack' of undefined
918
            at getFullErrorStack (.../node_modules/bunyan/lib/bunyan.js:1002:15)
919
            ...
920

    
921

    
922
## 0.14.4
923

    
924
- **Bad release. Use 0.14.5 instead.**
925
- Improve error serialization to walk the chain of `.cause()` errors
926
  from the likes of `WError` or `VError` error classes from
927
  [verror](https://github.com/davepacheco/node-verror) and
928
  [restify v2.0](https://github.com/mcavage/node-restify). Example:
929

    
930
        [2012-10-11T00:30:21.871Z] ERROR: imgapi/99612 on 0525989e-2086-4270-b960-41dd661ebd7d: my-message
931
            ValidationFailedError: my-message; caused by TypeError: cause-error-message
932
                at Server.apiPing (/opt/smartdc/imgapi/lib/app.js:45:23)
933
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
934
                at Server.setupReq (/opt/smartdc/imgapi/lib/app.js:178:9)
935
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
936
                at Server.parseBody (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/body_parser.js:15:33)
937
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
938
                at Server.parseQueryString (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/query.js:40:25)
939
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
940
                at Server._run (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:579:17)
941
                at Server._handle.log.trace.req (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:480:38)
942
            Caused by: TypeError: cause-error-message
943
                at Server.apiPing (/opt/smartdc/imgapi/lib/app.js:40:25)
944
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
945
                at Server.setupReq (/opt/smartdc/imgapi/lib/app.js:178:9)
946
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
947
                at Server.parseBody (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/body_parser.js:15:33)
948
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
949
                at Server.parseQueryString (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/query.js:40:25)
950
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
951
                at Server._run (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:579:17)
952
                at Server._handle.log.trace.req (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:480:38)
953

    
954

    
955
## 0.14.2
956

    
957
- [issue #45] Fix bunyan CLI (default output mode) to not crash on a 'res'
958
  field that isn't a response object, but a string.
959

    
960

    
961
## 0.14.1
962

    
963
- [issue #44] Fix the default `bunyan` CLI output of a `res.body` that is an
964
  object instead of a string. See issue#38 for the same with `req.body`.
965

    
966

    
967
## 0.14.0
968

    
969
- [pull #41] Safe `JSON.stringify`ing of emitted log records to avoid blowing
970
  up on circular objects (by Isaac Schlueter).
971

    
972

    
973
## 0.13.5
974

    
975
- [issue #39] Fix a bug with `client_req` handling in the default output
976
  of the `bunyan` CLI.
977

    
978

    
979
## 0.13.4
980

    
981
- [issue #38] Fix the default `bunyan` CLI output of a `req.body` that is an
982
  object instead of a string.
983

    
984

    
985
## 0.13.3
986

    
987
- Export `bunyan.resolveLevel(NAME-OR-NUM)` to resolve a level name or number
988
  to its log level number value:
989

    
990
        > bunyan.resolveLevel('INFO')
991
        30
992
        > bunyan.resolveLevel('debug')
993
        20
994

    
995
  A side-effect of this change is that the uppercase level name is now allowed
996
  in the logger constructor.
997

    
998

    
999
## 0.13.2
1000

    
1001
- [issue #35] Ensure that an accidental `log.info(BUFFER)`, where BUFFER is
1002
  a node.js Buffer object, doesn't blow up.
1003

    
1004

    
1005
## 0.13.1
1006

    
1007
- [issue #34] Ensure `req.body`, `res.body` and other request/response fields
1008
  are emitted by the `bunyan` CLI (mostly by Rob Gulewich).
1009

    
1010

    
1011

    
1012
## 0.13.0
1013

    
1014
- [issue #31] Re-instate defines for the (uppercase) log level names (TRACE,
1015
  DEBUG, etc.) in `bunyan -c "..."` filtering condition code. E.g.:
1016

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

    
1019

    
1020
## 0.12.0
1021

    
1022
- [pull #32] `bunyan -o short` for more concise output (by Dave Pacheco). E.g.:
1023

    
1024
        22:56:52.856Z  INFO myservice: My message
1025

    
1026
  instead of:
1027

    
1028
        [2012-02-08T22:56:52.856Z]  INFO: myservice/123 on example.com: My message
1029

    
1030

    
1031
## 0.11.3
1032

    
1033
- Add '--strict' option to `bunyan` CLI to suppress all but legal Bunyan JSON
1034
  log lines. By default non-JSON, and non-Bunyan lines are passed through.
1035

    
1036

    
1037
## 0.11.2
1038

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

    
1045

    
1046
## 0.11.1
1047

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

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

    
1055

    
1056
## 0.11.0
1057

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

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

    
1067

    
1068
## 0.10.0
1069

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

    
1073
        $ bunyan foo.log.gz
1074
        ...
1075

    
1076

    
1077
## 0.9.0
1078

    
1079
- [pull #16] Bullet proof the `bunyan.stdSerializers` (by github.com/rlidwka).
1080

    
1081
- [pull #15] The `bunyan` CLI will now chronologically merge multiple log
1082
  streams when it is given multiple file arguments. (by github.com/davepacheco)
1083

    
1084
        $ bunyan foo.log bar.log
1085
        ... merged log records ...
1086

    
1087
- [pull #15] A new `bunyan.RingBuffer` stream class that is useful for
1088
  keeping the last N log messages in memory. This can be a fast way to keep
1089
  recent, and thus hopefully relevant, log messages. (by @dapsays,
1090
  github.com/davepacheco)
1091

    
1092
  Potential uses: Live debugging if a running process could inspect those
1093
  messages. One could dump recent log messages at a finer log level than is
1094
  typically logged on
1095
  [`uncaughtException`](http://nodejs.org/docs/latest/api/all.html#all_event_uncaughtexception).
1096

    
1097
        var ringbuffer = new bunyan.RingBuffer({ limit: 100 });
1098
        var log = new bunyan({
1099
            name: 'foo',
1100
            streams: [{
1101
                type: 'raw',
1102
                stream: ringbuffer,
1103
                level: 'debug'
1104
            }]
1105
        });
1106

    
1107
        log.info('hello world');
1108
        console.log(ringbuffer.records);
1109

    
1110
- Add support for "raw" streams. This is a logging stream that is given
1111
  raw log record objects instead of a JSON-stringified string.
1112

    
1113
        function Collector() {
1114
            this.records = [];
1115
        }
1116
        Collector.prototype.write = function (rec) {
1117
            this.records.push(rec);
1118
        }
1119
        var log = new Logger({
1120
            name: 'mylog',
1121
            streams: [{
1122
                type: 'raw',
1123
                stream: new Collector()
1124
            }]
1125
        });
1126

    
1127
  See "examples/raw-stream.js". I expect raw streams to be useful for
1128
  piping Bunyan logging to separate services (e.g. <http://www.loggly.com/>,
1129
  <https://github.com/etsy/statsd>) or to separate in-process handling.
1130

    
1131
- Add test/corpus/*.log files (accidentally excluded) so the test suite
1132
  actually works(!).
1133

    
1134

    
1135
## 0.8.0
1136

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

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

    
1146
- jsstyle'ing (via `make check`)
1147

    
1148

    
1149
## 0.7.0
1150

    
1151
- [issue #12] Add `bunyan.createLogger(OPTIONS)` form, as is more typical in
1152
  node.js APIs.  This'll eventually become the preferred form.
1153

    
1154

    
1155
## 0.6.9
1156

    
1157
- Change `bunyan` CLI default output to color "src" info red. Before the "src"
1158
  information was uncolored. The "src" info is the filename, line number and
1159
  function name resulting from using `src: true` in `Logger` creation. I.e.,
1160
  the `(/Users/trentm/tm/node-bunyan/examples/hi.js:10)` in:
1161

    
1162
        [2012-04-10T22:28:58.237Z]  INFO: myapp/39339 on banana.local (/Users/trentm/tm/node-bunyan/examples/hi.js:10): hi
1163

    
1164
- Tweak `bunyan` CLI default output to still show an "err" field if it doesn't
1165
  have a "stack" attribute.
1166

    
1167

    
1168
## 0.6.8
1169

    
1170
- Fix bad bug in `log.child({...}, true);` where the added child fields **would
1171
  be added to the parent's fields**. This bug only existed for the "fast child"
1172
  path (that second `true` argument). A side-effect of fixing this is that
1173
  the "fast child" path is only 5 times as fast as the regular `log.child`,
1174
  instead of 10 times faster.
1175

    
1176

    
1177
## 0.6.7
1178

    
1179
- [issue #6] Fix bleeding 'type' var to global namespace. (Thanks Mike!)
1180

    
1181

    
1182
## 0.6.6
1183

    
1184
- Add support to the `bunyan` CLI taking log file path args, `bunyan foo.log`,
1185
  in addition to the usual `cat foo.log | bunyan`.
1186
- Improve reliability of the default output formatting of the `bunyan` CLI.
1187
  Before it could blow up processing log records missing some expected
1188
  fields.
1189

    
1190

    
1191
## 0.6.5
1192

    
1193
- ANSI coloring output from `bunyan` CLI tool (for the default output mode/style).
1194
  Also add the '--color' option to force coloring if the output stream is not
1195
  a TTY, e.g. `cat my.log | bunyan --color | less -R`. Use `--no-color` to
1196
  disable coloring, e.g. if your terminal doesn't support ANSI codes.
1197
- Add 'level' field to log record before custom fields for that record. This
1198
  just means that the raw record JSON will show the 'level' field earlier,
1199
  which is a bit nicer for raw reading.
1200

    
1201

    
1202
## 0.6.4
1203

    
1204
- [issue #5] Fix `log.info() -> boolean` to work properly. Previous all were
1205
  returning false. Ditto all trace/debug/.../fatal methods.
1206

    
1207

    
1208
## 0.6.3
1209

    
1210
- Allow an optional `msg` and arguments to the `log.info(<Error> err)` logging
1211
  form. For example, before:
1212

    
1213
        log.debug(my_error_instance)            // good
1214
        log.debug(my_error_instance, "boom!")   // wasn't allowed
1215

    
1216
  Now the latter is allowed if you want to expliciting set the log msg. Of course
1217
  this applies to all the `log.{trace|debug|info...}()` methods.
1218

    
1219
- `bunyan` cli output: clarify extra fields with quoting if empty or have
1220
  spaces. E.g. 'cmd' and 'stderr' in the following:
1221

    
1222
        [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")
1223

    
1224

    
1225
## 0.6.2
1226

    
1227
- Fix/guard against unintended inclusion of some files in npm published package
1228
  due to <https://github.com/isaacs/npm/issues/2144>
1229

    
1230

    
1231
## 0.6.1
1232

    
1233
- Internal: starting jsstyle usage.
1234
- Internal: add .npmignore. Previous packages had reams of bunyan crud in them.
1235

    
1236

    
1237
## 0.6.0
1238

    
1239
- Add 'pid' automatic log record field.
1240

    
1241

    
1242
## 0.5.3
1243

    
1244
- Add 'client_req' (HTTP client request) standard formatting in `bunyan` CLI
1245
  default output.
1246
- Improve `bunyan` CLI default output to include *all* log record keys. Unknown keys
1247
  are either included in the first line parenthetical (if short) or in the indented
1248
  subsequent block (if long or multiline).
1249

    
1250

    
1251
## 0.5.2
1252

    
1253
- [issue #3] More type checking of `new Logger(...)` and `log.child(...)`
1254
  options.
1255
- Start a test suite.
1256

    
1257

    
1258
## 0.5.1
1259

    
1260
- [issue #2] Add guard on `JSON.stringify`ing of log records before emission.
1261
  This will prevent `log.info` et al throwing on record fields that cannot be
1262
  represented as JSON. An error will be printed on stderr and a clipped log
1263
  record emitted with a 'bunyanMsg' key including error details. E.g.:
1264

    
1265
        bunyan: ERROR: could not stringify log record from /Users/trentm/tm/node-bunyan/examples/unstringifyable.js:12: TypeError: Converting circular structure to JSON
1266
        {
1267
          "name": "foo",
1268
          "hostname": "banana.local",
1269
          "bunyanMsg": "bunyan: ERROR: could not stringify log record from /Users/trentm/tm/node-bunyan/examples/unstringifyable.js:12: TypeError: Converting circular structure to JSON",
1270
        ...
1271

    
1272
  Some timing shows this does effect log speed:
1273

    
1274
        $ node tools/timeguard.js     # before
1275
        Time try/catch-guard on JSON.stringify:
1276
         - log.info:  0.07365ms per iteration
1277
        $ node tools/timeguard.js     # after
1278
        Time try/catch-guard on JSON.stringify:
1279
         - log.info:  0.07368ms per iteration
1280

    
1281

    
1282
## 0.5.0
1283

    
1284
- Use 10/20/... instead of 1/2/... for level constant values. Ostensibly this
1285
  allows for intermediary levels from the defined "trace/debug/..." set.
1286
  However, that is discouraged. I'd need a strong user argument to add
1287
  support for easily using alternative levels. Consider using a separate
1288
  JSON field instead.
1289
- s/service/name/ for Logger name field. "service" is unnecessarily tied
1290
  to usage for a service. No need to differ from log4j Logger "name".
1291
- Add `log.level(...)` and `log.levels(...)` API for changing logger stream
1292
  levels.
1293
- Add `TRACE|DEBUG|INFO|WARN|ERROR|FATAL` level constants to exports.
1294
- Add `log.info(err)` special case for logging an `Error` instance. For
1295
  example `log.info(new TypeError("boom")` will produce:
1296

    
1297
        ...
1298
        "err": {
1299
          "message": "boom",
1300
          "name": "TypeError",
1301
          "stack": "TypeError: boom\n    at Object.<anonymous> ..."
1302
        },
1303
        "msg": "boom",
1304
        ...
1305

    
1306

    
1307
## 0.4.0
1308

    
1309
- Add `new Logger({src: true})` config option to have a 'src' attribute be
1310
  automatically added to log records with the log call source info. Example:
1311

    
1312
        "src": {
1313
          "file": "/Users/trentm/tm/node-bunyan/examples/src.js",
1314
          "line": 20,
1315
          "func": "Wuzzle.woos"
1316
        },
1317

    
1318

    
1319
## 0.3.0
1320

    
1321
- `log.child(options[, simple])` Added `simple` boolean arg. Set `true` to
1322
  assert that options only add fields (no config changes). Results in a 10x
1323
  speed increase in child creation. See "tools/timechild.js". On my Mac,
1324
  "fast child" creation takes about 0.001ms. IOW, if your app is dishing
1325
  10,000 req/s, then creating a log child for each request will take
1326
  about 1% of the request time.
1327
- `log.clone` -> `log.child` to better reflect the relationship: streams and
1328
  serializers are inherited. Streams can't be removed as part of the child
1329
  creation. The child doesn't own the parent's streams (so can't close them).
1330
- Clean up Logger creation. The goal here was to ensure `log.child` usage
1331
  is fast. TODO: measure that.
1332
- Add `Logger.stdSerializers.err` serializer which is necessary to get good
1333
  Error object logging with node 0.6 (where core Error object properties
1334
  are non-enumerable).
1335

    
1336

    
1337
## 0.2.0
1338

    
1339
- Spec'ing core/recommended log record fields.
1340
- Add `LOG_VERSION` to exports.
1341
- Improvements to request/response serializations.
1342

    
1343

    
1344
## 0.1.0
1345

    
1346
First release.