Name: js-handler/node_modules/restify/node_modules/bunyan/CHANGES.md 
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:
 
9:
## bunyan 0.21.1
10:
 
11:
- [pull #83] Support rendering 'client_res' key in bunyan CLI (by
12:
  github.com/mcavage).
13:
 
14:
 
15:
## bunyan 0.21.0
16:
 
17:
- 'make check' clean, 4-space indenting. No functional change here, just
18:
  lots of code change.
19:
- [issue #80, #82] Drop assert that broke using 'rotating-file' with
20:
  a default `period` (by github.com/ricardograca).
21:
 
22:
 
23:
## bunyan 0.20.0
24:
 
25:
- [Slight backward incompatibility] Fix serializer bug introduced in 0.18.3
26:
  (see below) to only apply serializers to log records when appropriate.
27:
 
28:
  This also makes a semantic change to custom serializers. Before this change
29:
  a serializer function was called for a log record key when that value was
30:
  truth-y. The semantic change is to call the serializer function as long
31:
  as the value is not `undefined`. That means that a serializer function
32:
  should handle falsey values such as `false` and `null`.
33:
 
34:
- Update to latest 'mv' dep (required for rotating-file support) to support
35:
  node v0.10.0.
36:
 
37:
 
38:
## bunyan 0.19.0
39:
 
40:
**WARNING**: This release includes a bug introduced in bunyan 0.18.3 (see
41:
below). Please upgrade to bunyan 0.20.0.
42:
 
43:
- [Slight backward incompatibility] Change the default error serialization
44:
  (a.k.a. `bunyan.stdSerializers.err`) to *not* serialize all additional
45:
  attributes of the given error object. This is an open door to unsafe logging
46:
  and logging should always be safe. With this change, error serialization
47:
  will log these attributes: message, name, stack, code, signal. The latter
48:
  two are added because some core node APIs include those fields (e.g.
49:
  `child_process.exec`).
50:
 
51:
  Concrete examples where this has hurt have been the "domain" change
52:
  necessitating 0.18.3 and a case where
53:
  [node-restify](https://github.com/mcavage/node-restify) uses an error object
54:
  as the response object. When logging the `err` and `res` in the same log
55:
  statement (common for restify audit logging), the `res.body` would be JSON
56:
  stringified as '[Circular]' as it had already been emitted for the `err` key.
57:
  This results in a WTF with the bunyan CLI because the `err.body` is not
58:
  rendered.
59:
 
60:
  If you need the old behaviour back you will need to do this:
61:
 
62:
        var bunyan = require('bunyan');
63:
        var errSkips = {
64:
            // Skip domain keys. `domain` especially can have huge objects that can
65:
            // OOM your app when trying to JSON.stringify.
66:
            domain: true,
67:
            domain_emitter: true,
68:
            domain_bound: true,
69:
            domain_thrown: true
70:
        };
71:
        bunyan.stdSerializers.err = function err(err) {
72:
           if (!err || !err.stack)
73:
               return err;
74:
           var obj = {
75:
               message: err.message,
76:
               name: err.name,
77:
               stack: getFullErrorStack(err)
78:
           }
79:
           Object.keys(err).forEach(function (k) {
80:
               if (err[k] !== undefined && !errSkips[k]) {
81:
                   obj[k] = err[k];
82:
               }
83:
           });
84:
           return obj;
85:
         };
86:
 
87:
- "long" and "bunyan" output formats for the CLI. `bunyan -o long` is the default
88:
  format, the same as before, just called "long" now instead of the cheesy "paul"
89:
  name. The "bunyan" output format is the same as "json-0", just with a more
90:
  convenient name.
91:
 
92:
 
93:
## bunyan 0.18.3
94:
 
95:
**WARNING**: This release introduced a bug such that all serializers are
96:
applied to all log records even if the log record did not contain the key
97:
for that serializer. If a logger serializer function does not handle
98:
being given `undefined`, then you'll get warnings like this on stderr:
99:
 
100:
    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: ...
101:
        at Object.bunyan.createLogger.serializers.foo (.../myapp.js:20:15)
102:
        at Logger._applySerializers (.../lib/bunyan.js:644:46)
103:
        at Array.forEach (native)
104:
        at Logger._applySerializers (.../lib/bunyan.js:640:33)
105:
        ...
106:
 
107:
and the following junk in written log records:
108:
 
109:
    "foo":"(Error in Bunyan log "foo" serializer broke field. See stderr for details.)"
110:
 
111:
Please upgrade to bunyan 0.20.0.
112:
 
113:
 
114:
- Change the `bunyan.stdSerializers.err` serializer for errors to *exclude*
115:
  [the "domain*" keys](http://nodejs.org/docs/latest/api/all.html#all_additions_to_error_objects).
116:
  `err.domain` will include its assigned members which can arbitrarily large
117:
  objects that are not intended for logging.
118:
 
119:
- Make the "dtrace-provider" dependency optional. I hate to do this, but
120:
  installing bunyan on Windows is made very difficult with this as a required
121:
  dep.  Even though "dtrace-provider" stubs out for non-dtrace-y platforms,
122:
  without a compiler and Python around, node-gyp just falls over.
123:
 
124:
 
125:
## bunyan 0.18.2
126:
 
127:
- [pull #67] Remove debugging prints in rotating-file support.
128:
  (by github.com/chad3814).
129:
- Update to [email protected]
130:
 
131:
 
132:
## bunyan 0.18.1
133:
 
134:
- Get the `bunyan` CLI to **not** automatically page (i.e. pipe to `less`)
135:
  if stdin isn't a TTY, or if following dtrace probe output (via `-p PID`),
136:
  or if not given log file arguments.
137:
 
138:
 
139:
## bunyan 0.18.0
140:
 
141:
- Automatic paging support in the `bunyan` CLI (similar to `git log` et al).
142:
  IOW, `bunyan` will open your pager (by default `less`) and pipe rendered
143:
  log output through it. A main benefit of this is getting colored logs with
144:
  a pager without the pain. Before you had to explicit use `--color` to tell
145:
  bunyan to color output when the output was not a TTY:
146:
 
147:
        bunyan foo.log --color | less -R        # before
148:
        bunyan foo.log                          # now
149:
 
150:
  Disable with the `--no-pager` option or the `BUNYAN_NO_PAGER=1` environment
151:
  variable.
152:
 
153:
  Limitations: Only supported for node >=0.8. Windows is not supported (at
154:
  least not yet).
155:
 
156:
- Switch test suite to nodeunit (still using a node-tap'ish API via
157:
  a helper).
158:
 
159:
 
160:
## bunyan 0.17.0
161:
 
162:
- [issue #33] Log rotation support:
163:
 
164:
        var bunyan = require('bunyan');
165:
        var log = bunyan.createLogger({
166:
            name: 'myapp',
167:
            streams: [{
168:
                type: 'rotating-file',
169:
                path: '/var/log/myapp.log',
170:
                count: 7,
171:
                period: 'daily'
172:
            }]
173:
        });
174:
 
175:
 
176:
- Tweak to CLI default pretty output: don't special case "latency" field.
177:
  The special casing was perhaps nice, but less self-explanatory.
178:
  Before:
179:
 
180:
        [2012-12-27T21:17:38.218Z]  INFO: audit/45769 on myserver: handled: 200 (15ms, audit=true, bar=baz)
181:
          GET /foo
182:
          ...
183:
 
184:
  After:
185:
 
186:
        [2012-12-27T21:17:38.218Z]  INFO: audit/45769 on myserver: handled: 200 (audit=true, bar=baz, latency=15)
187:
          GET /foo
188:
          ...
189:
 
190:
- *Exit* CLI on EPIPE, otherwise we sit there useless processing a huge log
191:
  file with, e.g.  `bunyan huge.log | head`.
192:
 
193:
 
194:
## bunyan 0.16.8
195:
 
196:
- Guards on `-c CONDITION` usage to attempt to be more user friendly.
197:
  Bogus JS code will result in this:
198:
 
199:
        $ bunyan portal.log -c '[email protected]'
200:
        bunyan: error: illegal CONDITION code: SyntaxError: Unexpected token ILLEGAL
201:
          CONDITION script:
202:
            Object.prototype.TRACE = 10;
203:
            Object.prototype.DEBUG = 20;
204:
            Object.prototype.INFO = 30;
205:
            Object.prototype.WARN = 40;
206:
            Object.prototype.ERROR = 50;
207:
            Object.prototype.FATAL = 60;
208:
            [email protected]
209:
          Error:
210:
            SyntaxError: Unexpected token ILLEGAL
211:
                at new Script (vm.js:32:12)
212:
                at Function.Script.createScript (vm.js:48:10)
213:
                at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:465:27)
214:
                at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16)
215:
                at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3)
216:
                at Module._compile (module.js:449:26)
217:
                at Object.Module._extensions..js (module.js:467:10)
218:
                at Module.load (module.js:356:32)
219:
                at Function.Module._load (module.js:312:12)
220:
                at Module.runMain (module.js:492:10)
221:
 
222:
  And all CONDITION scripts will be run against a minimal valid Bunyan
223:
  log record to ensure they properly guard against undefined values
224:
  (at least as much as can reasonably be checked). For example:
225:
 
226:
        $ bunyan portal.log -c 'this.req.username=="bob"'
227:
        bunyan: error: CONDITION code cannot safely filter a minimal Bunyan log record
228:
          CONDITION script:
229:
            Object.prototype.TRACE = 10;
230:
            Object.prototype.DEBUG = 20;
231:
            Object.prototype.INFO = 30;
232:
            Object.prototype.WARN = 40;
233:
            Object.prototype.ERROR = 50;
234:
            Object.prototype.FATAL = 60;
235:
            this.req.username=="bob"
236:
          Minimal Bunyan log record:
237:
            {
238:
              "v": 0,
239:
              "level": 30,
240:
              "name": "name",
241:
              "hostname": "hostname",
242:
              "pid": 123,
243:
              "time": 1355514346206,
244:
              "msg": "msg"
245:
            }
246:
          Filter error:
247:
            TypeError: Cannot read property 'username' of undefined
248:
                at bunyan-condition-0:7:9
249:
                at Script.Object.keys.forEach.(anonymous function) [as runInNewContext] (vm.js:41:22)
250:
                at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:477:18)
251:
                at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16)
252:
                at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3)
253:
                at Module._compile (module.js:449:26)
254:
                at Object.Module._extensions..js (module.js:467:10)
255:
                at Module.load (module.js:356:32)
256:
                at Function.Module._load (module.js:312:12)
257:
                at Module.runMain (module.js:492:10)
258:
 
259:
  A proper way to do that condition would be:
260:
 
261:
        $ bunyan portal.log -c 'this.req && this.req.username=="bob"'
262:
 
263:
 
264:
 
265:
## bunyan 0.16.7
266:
 
267:
- [issue #59] Clear a possibly interrupted ANSI color code on signal
268:
  termination.
269:
 
270:
 
271:
## bunyan 0.16.6
272:
 
273:
- [issue #56] Support `bunyan -p NAME` to dtrace all PIDs matching 'NAME' in
274:
  their command and args (using `ps -A -o pid,command | grep NAME` or, on SunOS
275:
  `pgrep -lf NAME`). E.g.:
276:
 
277:
        bunyan -p myappname
278:
 
279:
  This is useful for usage of node's [cluster
280:
  module](http://nodejs.org/docs/latest/api/all.html#all_cluster) where you'll
281:
  have multiple worker processes.
282:
 
283:
 
284:
## bunyan 0.16.5
285:
 
286:
- Allow `bunyan -p '*'` to capture bunyan dtrace probes from **all** processes.
287:
- issue #55: Add support for `BUNYAN_NO_COLOR` environment variable to
288:
  turn off all output coloring. This is still overridden by the `--color`
289:
  and `--no-color` options.
290:
 
291:
 
292:
## bunyan 0.16.4
293:
 
294:
- issue #54: Ensure (again, see 0.16.2) that stderr from the dtrace child
295:
  process (when using `bunyan -p PID`) gets through. There had been a race
296:
  between exiting bunyan and the flushing of the dtrace process' stderr.
297:
 
298:
 
299:
## bunyan 0.16.3
300:
 
301:
- Drop 'trentm-dtrace-provider' fork dep now that
302:
  <https://github.com/chrisa/node-dtrace-provider/pull/24> has been resolved.
303:
  Back to dtrace-provider.
304:
 
305:
 
306:
## bunyan 0.16.2
307:
 
308:
- Ensure that stderr from the dtrace child process (when using `bunyan -p PID`)
309:
  gets through. The `pipe` usage wasn't working on SmartOS. This is important
310:
  to show the user if they need to 'sudo'.
311:
 
312:
 
313:
## bunyan 0.16.1
314:
 
315:
- Ensure that a possible dtrace child process (with using `bunyan -p PID`) is
316:
  terminated on signal termination of the bunyan CLI (at least for SIGINT,
317:
  SIGQUIT, SIGTERM, SIGHUP).
318:
 
319:
 
320:
## bunyan 0.16.0
321:
 
322:
- Add `bunyan -p PID` support. This is a convenience wrapper that effectively
323:
  calls:
324:
 
325:
        dtrace -x strsize=4k -qn 'bunyan$PID:::log-*{printf("%s", copyinstr(arg0))}' | bunyan
326:
 
327:
 
328:
## bunyan 0.15.0
329:
 
330:
- issue #48: Dtrace support! The elevator pitch is you can watch all logging
331:
  from all Bunyan-using process with something like this:
332:
 
333:
        dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%d: %s: %s", pid, probefunc, copyinstr(arg0))}'
334:
 
335:
  And this can include log levels *below* what the service is actually configured
336:
  to log. E.g. if the service is only logging at INFO level and you need to see
337:
  DEBUG log messages, with this you can. Obviously this only works on dtrace-y
338:
  platforms: Illumos derivatives of SunOS (e.g. SmartOS, OmniOS), Mac, FreeBSD.
339:
 
340:
  Or get the bunyan CLI to render logs nicely:
341:
 
342:
        dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%s", copyinstr(arg0))}' | bunyan
343:
 
344:
  See <https://github.com/trentm/node-bunyan#dtrace-support> for details. By
345:
  Bryan Cantrill.
346:
 
347:
 
348:
## bunyan 0.14.6
349:
 
350:
- Export `bunyan.safeCycles()`. This may be useful for custom `type == "raw"`
351:
  streams that may do JSON stringification of log records themselves. Usage:
352:
 
353:
        var str = JSON.stringify(rec, bunyan.safeCycles());
354:
 
355:
- [issue #49] Allow a `log.child()` to specify the level of inherited streams.
356:
  For example:
357:
 
358:
        # Before
359:
        var childLog = log.child({...});
360:
        childLog.level('debug');
361:
 
362:
        # After
363:
        var childLog = log.child({..., level: 'debug'});
364:
 
365:
- Improve the Bunyan CLI crash message to make it easier to provide relevant
366:
  details in a bug report.
367:
 
368:
 
369:
## bunyan 0.14.5
370:
 
371:
- Fix a bug in the long-stack-trace error serialization added in 0.14.4. The
372:
  symptom:
373:
 
374:
        [email protected]: .../node_modules/bunyan/lib/bunyan.js:1002
375:
          var ret = ex.stack || ex.toString();
376:
                      ^
377:
        TypeError: Cannot read property 'stack' of undefined
378:
            at getFullErrorStack (.../node_modules/bunyan/lib/bunyan.js:1002:15)
379:
            ...
380:
 
381:
 
382:
## bunyan 0.14.4
383:
 
384:
- **Bad release. Use 0.14.5 instead.**
385:
- Improve error serialization to walk the chain of `.cause()` errors
386:
  from the likes of `WError` or `VError` error classes from
387:
  [verror](https://github.com/davepacheco/node-verror) and
388:
  [restify v2.0](https://github.com/mcavage/node-restify). Example:
389:
 
390:
        [2012-10-11T00:30:21.871Z] ERROR: imgapi/99612 on 0525989e-2086-4270-b960-41dd661ebd7d: my-message
391:
            ValidationFailedError: my-message; caused by TypeError: cause-error-message
392:
                at Server.apiPing (/opt/smartdc/imgapi/lib/app.js:45:23)
393:
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
394:
                at Server.setupReq (/opt/smartdc/imgapi/lib/app.js:178:9)
395:
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
396:
                at Server.parseBody (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/body_parser.js:15:33)
397:
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
398:
                at Server.parseQueryString (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/query.js:40:25)
399:
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
400:
                at Server._run (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:579:17)
401:
                at Server._handle.log.trace.req (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:480:38)
402:
            Caused by: TypeError: cause-error-message
403:
                at Server.apiPing (/opt/smartdc/imgapi/lib/app.js:40:25)
404:
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
405:
                at Server.setupReq (/opt/smartdc/imgapi/lib/app.js:178:9)
406:
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
407:
                at Server.parseBody (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/body_parser.js:15:33)
408:
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
409:
                at Server.parseQueryString (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/query.js:40:25)
410:
                at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
411:
                at Server._run (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:579:17)
412:
                at Server._handle.log.trace.req (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:480:38)
413:
 
414:
 
415:
## bunyan 0.14.2
416:
 
417:
- [issue #45] Fix bunyan CLI (default output mode) to not crash on a 'res'
418:
  field that isn't a response object, but a string.
419:
 
420:
 
421:
## bunyan 0.14.1
422:
 
423:
- [issue #44] Fix the default `bunyan` CLI output of a `res.body` that is an
424:
  object instead of a string. See issue#38 for the same with `req.body`.
425:
 
426:
 
427:
## bunyan 0.14.0
428:
 
429:
- [pull #41] Safe `JSON.stringify`ing of emitted log records to avoid blowing
430:
  up on circular objects (by Isaac Schlueter).
431:
 
432:
 
433:
## bunyan 0.13.5
434:
 
435:
- [issue #39] Fix a bug with `client_req` handling in the default output
436:
  of the `bunyan` CLI.
437:
 
438:
 
439:
## bunyan 0.13.4
440:
 
441:
- [issue #38] Fix the default `bunyan` CLI output of a `req.body` that is an
442:
  object instead of a string.
443:
 
444:
 
445:
## bunyan 0.13.3
446:
 
447:
- Export `bunyan.resolveLevel(NAME-OR-NUM)` to resolve a level name or number
448:
  to its log level number value:
449:
 
450:
        > bunyan.resolveLevel('INFO')
451:
        30
452:
        > bunyan.resolveLevel('debug')
453:
        20
454:
 
455:
  A side-effect of this change is that the uppercase level name is now allowed
456:
  in the logger constructor.
457:
 
458:
 
459:
## bunyan 0.13.2
460:
 
461:
- [issue #35] Ensure that an accidental `log.info(BUFFER)`, where BUFFER is
462:
  a node.js Buffer object, doesn't blow up.
463:
 
464:
 
465:
## bunyan 0.13.1
466:
 
467:
- [issue #34] Ensure `req.body`, `res.body` and other request/response fields
468:
  are emitted by the `bunyan` CLI (mostly by Rob Gulewich).
469:
 
470:
 
471:
 
472:
## bunyan 0.13.0
473:
 
474:
- [issue #31] Re-instate defines for the (uppercase) log level names (TRACE,
475:
  DEBUG, etc.) in `bunyan -c "..."` filtering condition code. E.g.:
476:
 
477:
        $ ... | bunyan -c 'level >= ERROR'
478:
 
479:
 
480:
## bunyan 0.12.0
481:
 
482:
- [pull #32] `bunyan -o short` for more concise output (by Dave Pacheco). E.g.:
483:
 
484:
        22:56:52.856Z  INFO myservice: My message
485:
 
486:
  instead of:
487:
 
488:
        [2012-02-08T22:56:52.856Z]  INFO: myservice/123 on example.com: My message
489:
 
490:
 
491:
## bunyan 0.11.3
492:
 
493:
- Add '--strict' option to `bunyan` CLI to suppress all but legal Bunyan JSON
494:
  log lines. By default non-JSON, and non-Bunyan lines are passed through.
495:
 
496:
 
497:
## bunyan 0.11.2
498:
 
499:
- [issue #30] Robust handling of 'req' field without a 'headers' subfield
500:
  in `bunyan` CLI.
501:
- [issue #31] Pull the TRACE, DEBUG, et al defines from `bunyan -c "..."`
502:
  filtering code. This was added in v0.11.1, but has a significant adverse
503:
  affect.
504:
 
505:
 
506:
## bunyan 0.11.1
507:
 
508:
- **Bad release. The TRACE et al names are bleeding into the log records
509:
  when using '-c'.**
510:
- Add defines for the (uppercase) log level names (TRACE, DEBUG, etc.) in
511:
  `bunyan -c "..."` filtering condition code. E.g.:
512:
 
513:
        $ ... | bunyan -c 'level >= ERROR'
514:
 
515:
 
516:
## bunyan 0.11.0
517:
 
518:
- [pull #29] Add -l/--level for level filtering, and -c/--condition for
519:
  arbitrary conditional filtering (by github.com/isaacs):
520:
 
521:
        $ ... | bunyan -l error   # filter out log records below error
522:
        $ ... | bunyan -l 50      # numeric value works too
523:
        $ ... | bunyan -c 'level===50'              # equiv with -c filtering
524:
        $ ... | bunyan -c 'pid===123'               # filter on any field
525:
        $ ... | bunyan -c 'pid===123' -c '_audit'   # multiple filters
526:
 
527:
 
528:
## bunyan 0.10.0
529:
 
530:
- [pull #24] Support for gzip'ed log files in the bunyan CLI (by
531:
  github.com/mhart):
532:
 
533:
        $ bunyan foo.log.gz
534:
        ...
535:
 
536:
 
537:
## bunyan 0.9.0
538:
 
539:
- [pull #16] Bullet proof the `bunyan.stdSerializers` (by github.com/rlidwka).
540:
 
541:
- [pull #15] The `bunyan` CLI will now chronologically merge multiple log
542:
  streams when it is given multiple file arguments. (by github.com/davepacheco)
543:
 
544:
        $ bunyan foo.log bar.log
545:
        ... merged log records ...
546:
 
547:
- [pull #15] A new `bunyan.RingBuffer` stream class that is useful for
548:
  keeping the last N log messages in memory. This can be a fast way to keep
549:
  recent, and thus hopefully relevant, log messages. (by @dapsays,
550:
  github.com/davepacheco)
551:
 
552:
  Potential uses: Live debugging if a running process could inspect those
553:
  messages. One could dump recent log messages at a finer log level than is
554:
  typically logged on
555:
  [`uncaughtException`](http://nodejs.org/docs/latest/api/all.html#all_event_uncaughtexception).
556:
 
557:
        var ringbuffer = new bunyan.RingBuffer({ limit: 100 });
558:
        var log = new bunyan({
559:
            name: 'foo',
560:
            streams: [{
561:
                type: 'raw',
562:
                stream: ringbuffer,
563:
                level: 'debug'
564:
            }]
565:
        });
566:
 
567:
        log.info('hello world');
568:
        console.log(ringbuffer.records);
569:
 
570:
- Add support for "raw" streams. This is a logging stream that is given
571:
  raw log record objects instead of a JSON-stringified string.
572:
 
573:
        function Collector() {
574:
            this.records = [];
575:
        }
576:
        Collector.prototype.write = function (rec) {
577:
            this.records.push(rec);
578:
        }
579:
        var log = new Logger({
580:
            name: 'mylog',
581:
            streams: [{
582:
                type: 'raw',
583:
                stream: new Collector()
584:
            }]
585:
        });
586:
 
587:
  See "examples/raw-stream.js". I expect raw streams to be useful for
588:
  piping Bunyan logging to separate services (e.g. <http://www.loggly.com/>,
589:
  <https://github.com/etsy/statsd>) or to separate in-process handling.
590:
 
591:
- Add test/corpus/*.log files (accidentally excluded) so the test suite
592:
  actually works(!).
593:
 
594:
 
595:
## bunyan 0.8.0
596:
 
597:
- [pull #21] Bunyan loggers now re-emit `fs.createWriteStream` error events.
598:
  By github.com/EvanOxfeld. See "examples/handle-fs-error.js" and
599:
  "test/error-event.js" for details.
600:
 
601:
        var log = new Logger({name: 'mylog', streams: [{path: FILENAME}]});
602:
        log.on('error', function (err, stream) {
603:
            // Handle error writing to or creating FILENAME.
604:
        });
605:
 
606:
- jsstyle'ing (via `make check`)
607:
 
608:
 
609:
## bunyan 0.7.0
610:
 
611:
- [issue #12] Add `bunyan.createLogger(OPTIONS)` form, as is more typical in
612:
  node.js APIs.  This'll eventually become the preferred form.
613:
 
614:
 
615:
## bunyan 0.6.9
616:
 
617:
- Change `bunyan` CLI default output to color "src" info red. Before the "src"
618:
  information was uncolored. The "src" info is the filename, line number and
619:
  function name resulting from using `src: true` in `Logger` creation. I.e.,
620:
  the `(/Users/trentm/tm/node-bunyan/examples/hi.js:10)` in:
621:
 
622:
        [2012-04-10T22:28:58.237Z]  INFO: myapp/39339 on banana.local (/Users/trentm/tm/node-bunyan/examples/hi.js:10): hi
623:
 
624:
- Tweak `bunyan` CLI default output to still show an "err" field if it doesn't
625:
  have a "stack" attribute.
626:
 
627:
 
628:
## bunyan 0.6.8
629:
 
630:
- Fix bad bug in `log.child({...}, true);` where the added child fields **would
631:
  be added to the parent's fields**. This bug only existed for the "fast child"
632:
  path (that second `true` argument). A side-effect of fixing this is that
633:
  the "fast child" path is only 5 times as fast as the regular `log.child`,
634:
  instead of 10 times faster.
635:
 
636:
 
637:
## bunyan 0.6.7
638:
 
639:
- [issue #6] Fix bleeding 'type' var to global namespace. (Thanks Mike!)
640:
 
641:
 
642:
## bunyan 0.6.6
643:
 
644:
- Add support to the `bunyan` CLI taking log file path args, `bunyan foo.log`,
645:
  in addition to the usual `cat foo.log | bunyan`.
646:
- Improve reliability of the default output formatting of the `bunyan` CLI.
647:
  Before it could blow up processing log records missing some expected
648:
  fields.
649:
 
650:
 
651:
## bunyan 0.6.5
652:
 
653:
- ANSI coloring output from `bunyan` CLI tool (for the default output mode/style).
654:
  Also add the '--color' option to force coloring if the output stream is not
655:
  a TTY, e.g. `cat my.log | bunyan --color | less -R`. Use `--no-color` to
656:
  disable coloring, e.g. if your terminal doesn't support ANSI codes.
657:
- Add 'level' field to log record before custom fields for that record. This
658:
  just means that the raw record JSON will show the 'level' field earlier,
659:
  which is a bit nicer for raw reading.
660:
 
661:
 
662:
## bunyan 0.6.4
663:
 
664:
- [issue #5] Fix `log.info() -> boolean` to work properly. Previous all were
665:
  returning false. Ditto all trace/debug/.../fatal methods.
666:
 
667:
 
668:
## bunyan 0.6.3
669:
 
670:
- Allow an optional `msg` and arguments to the `log.info(<Error> err)` logging
671:
  form. For example, before:
672:
 
673:
        log.debug(my_error_instance)            // good
674:
        log.debug(my_error_instance, "boom!")   // wasn't allowed
675:
 
676:
  Now the latter is allowed if you want to expliciting set the log msg. Of course
677:
  this applies to all the `log.{trace|debug|info...}()` methods.
678:
 
679:
- `bunyan` cli output: clarify extra fields with quoting if empty or have
680:
  spaces. E.g. 'cmd' and 'stderr' in the following:
681:
 
682:
        [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")
683:
 
684:
 
685:
## bunyan 0.6.2
686:
 
687:
- Fix/guard against unintended inclusion of some files in npm published package
688:
  due to <https://github.com/isaacs/npm/issues/2144>
689:
 
690:
 
691:
## bunyan 0.6.1
692:
 
693:
- Internal: starting jsstyle usage.
694:
- Internal: add .npmignore. Previous packages had reams of bunyan crud in them.
695:
 
696:
 
697:
## bunyan 0.6.0
698:
 
699:
- Add 'pid' automatic log record field.
700:
 
701:
 
702:
## bunyan 0.5.3
703:
 
704:
- Add 'client_req' (HTTP client request) standard formatting in `bunyan` CLI
705:
  default output.
706:
- Improve `bunyan` CLI default output to include *all* log record keys. Unknown keys
707:
  are either included in the first line parenthetical (if short) or in the indented
708:
  subsequent block (if long or multiline).
709:
 
710:
 
711:
## bunyan 0.5.2
712:
 
713:
- [issue #3] More type checking of `new Logger(...)` and `log.child(...)`
714:
  options.
715:
- Start a test suite.
716:
 
717:
 
718:
## bunyan 0.5.1
719:
 
720:
- [issue #2] Add guard on `JSON.stringify`ing of log records before emission.
721:
  This will prevent `log.info` et al throwing on record fields that cannot be
722:
  represented as JSON. An error will be printed on stderr and a clipped log
723:
  record emitted with a 'bunyanMsg' key including error details. E.g.:
724:
 
725:
        bunyan: ERROR: could not stringify log record from /Users/trentm/tm/node-bunyan/examples/unstringifyable.js:12: TypeError: Converting circular structure to JSON
726:
        {
727:
          "name": "foo",
728:
          "hostname": "banana.local",
729:
          "bunyanMsg": "bunyan: ERROR: could not stringify log record from /Users/trentm/tm/node-bunyan/examples/unstringifyable.js:12: TypeError: Converting circular structure to JSON",
730:
        ...
731:
 
732:
  Some timing shows this does effect log speed:
733:
 
734:
        $ node tools/timeguard.js     # before
735:
        Time try/catch-guard on JSON.stringify:
736:
         - log.info:  0.07365ms per iteration
737:
        $ node tools/timeguard.js     # after
738:
        Time try/catch-guard on JSON.stringify:
739:
         - log.info:  0.07368ms per iteration
740:
 
741:
 
742:
## bunyan 0.5.0
743:
 
744:
- Use 10/20/... instead of 1/2/... for level constant values. Ostensibly this
745:
  allows for intermediary levels from the defined "trace/debug/..." set.
746:
  However, that is discouraged. I'd need a strong user argument to add
747:
  support for easily using alternative levels. Consider using a separate
748:
  JSON field instead.
749:
- s/service/name/ for Logger name field. "service" is unnecessarily tied
750:
  to usage for a service. No need to differ from log4j Logger "name".
751:
- Add `log.level(...)` and `log.levels(...)` API for changing logger stream
752:
  levels.
753:
- Add `TRACE|DEBUG|INFO|WARN|ERROR|FATAL` level constants to exports.
754:
- Add `log.info(err)` special case for logging an `Error` instance. For
755:
  example `log.info(new TypeError("boom")` will produce:
756:
 
757:
        ...
758:
        "err": {
759:
          "message": "boom",
760:
          "name": "TypeError",
761:
          "stack": "TypeError: boom\n    at Object.<anonymous> ..."
762:
        },
763:
        "msg": "boom",
764:
        ...
765:
 
766:
 
767:
## bunyan 0.4.0
768:
 
769:
- Add `new Logger({src: true})` config option to have a 'src' attribute be
770:
  automatically added to log records with the log call source info. Example:
771:
 
772:
        "src": {
773:
          "file": "/Users/trentm/tm/node-bunyan/examples/src.js",
774:
          "line": 20,
775:
          "func": "Wuzzle.woos"
776:
        },
777:
 
778:
 
779:
## bunyan 0.3.0
780:
 
781:
- `log.child(options[, simple])` Added `simple` boolean arg. Set `true` to
782:
  assert that options only add fields (no config changes). Results in a 10x
783:
  speed increase in child creation. See "tools/timechild.js". On my Mac,
784:
  "fast child" creation takes about 0.001ms. IOW, if your app is dishing
785:
  10,000 req/s, then creating a log child for each request will take
786:
  about 1% of the request time.
787:
- `log.clone` -> `log.child` to better reflect the relationship: streams and
788:
  serializers are inherited. Streams can't be removed as part of the child
789:
  creation. The child doesn't own the parent's streams (so can't close them).
790:
- Clean up Logger creation. The goal here was to ensure `log.child` usage
791:
  is fast. TODO: measure that.
792:
- Add `Logger.stdSerializers.err` serializer which is necessary to get good
793:
  Error object logging with node 0.6 (where core Error object properties
794:
  are non-enumerable).
795:
 
796:
 
797:
## bunyan 0.2.0
798:
 
799:
- Spec'ing core/recommended log record fields.
800:
- Add `LOG_VERSION` to exports.
801:
- Improvements to request/response serializations.
802:
 
803:
 
804:
## bunyan 0.1.0
805:
 
806:
First release.