Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 1133 lines (754 sloc) 39.578 kb
135163e Trent Mick VERSIONS, cutarelease prep
authored
1 # bunyan Changelog
2
c05f7cd Trent Mick don't break 'make versioncheck'
authored
3 Known issues:
04583ab Trent Mick known issue
authored
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
2828e46 Trent Mick prep for future dev
authored
9 ## bunyan 1.3.5 (not yet released)
10
11 (nothing yet)
12
13
46b0162 Trent Mick prepare for 1.3.4 release
authored
14 ## bunyan 1.3.4
6cabaa9 Trent Mick prep for future dev
authored
15
c25ce3a Trent Mick Allow `log.child(...)` to work even if the logger is a *sub-class* of Bu...
authored
16 - Allow `log.child(...)` to work even if the logger is a *sub-class*
17 of Bunyan's Logger class.
a7c6461 Trent Mick Hide 'source-map-support' require from browserify. Fixes #219
authored
18 - [issue #219] Hide 'source-map-support' require from browserify.
22669db Trent Mick Reset `haveNonRawStreams` on `<logger>.addStream`
authored
19 - [issue #218] Reset `haveNonRawStreams` on `<logger>.addStream`.
6cabaa9 Trent Mick prep for future dev
authored
20
21
e6cff79 Trent Mick prepare for 1.3.3 release
authored
22 ## bunyan 1.3.3
ffd9903 Trent Mick prep for future dev
authored
23
b7cacf6 Trent Mick changelog for recent change; TODO
authored
24 - [pull #127] Update to dtrace-provider 0.4.0, which gives io.js 1.x support
25 for dtrace-y parts of Bunyan.
ffd9903 Trent Mick prep for future dev
authored
26
27
8598a47 Trent Mick prepare for 1.3.2 release
authored
28 ## bunyan 1.3.2
bed6fbf Trent Mick prep for future dev
authored
29
64b8fd1 Trent Mick test cases for #182, style tweaks, changelog, etc.
authored
30 - [pull #182] Fallback to using the optional 'safe-json-stringify' module
31 if `JSON.stringify` throws -- possibly with an enumerable property
32 getter than throws. By Martin Gausby.
bed6fbf Trent Mick prep for future dev
authored
33
34
d61fd2f Trent Mick prepare for 1.3.1 release
authored
35 ## bunyan 1.3.1
b975c3a Trent Mick prep for future dev
authored
36
b9e3a0d Trent Mick export 'bunyan.RotatingFileStream'
authored
37 - Export `bunyan.RotatingFileStream` which is needed if one wants to
38 customize it. E.g. see issue #194.
39
83f3389 Trent Mick added integration with source-map-support for integration with sourcemap...
authored
40 - [pull #122] Source Map support for caller line position for [the "src"
41 field](https://github.com/trentm/node-bunyan#src). This could be interesting
42 for [CoffeeScript](http://coffeescript.org/documentation/docs/sourcemap.html)
43 users of Bunyan. By Manuel Schneider.
44
1ed684d Trent Mick Ensure a top-level `level` given in `bunyan.createLogger` is *used* for ...
authored
45 - [issue #164] Ensure a top-level `level` given in `bunyan.createLogger`
46 is *used* for given `streams`. For example, ensure that the following
47 results in the stream having a DEBUG level:
48
49 var log = bunyan.createLogger({
50 name: 'foo',
51 level: 'debug',
52 streams: [
53 {
54 path: '/var/tmp/foo.log'
55 }
56 ]
57 });
58
59 This was broken in the 1.0.1 release. Between that release and 1.3.0
60 the "/var/tmp/foo.log" stream would be at the INFO level (Bunyan's
61 default level).
b975c3a Trent Mick prep for future dev
authored
62
63
6b9ce61 Trent Mick prepare for 1.3.0 release
authored
64 ## bunyan 1.3.0
783b1c4 Trent Mick prep for future dev
authored
65
0d040ac Trent Mick `bunyan -L` (or `bunyan --time local`) to show local time.
authored
66 - [issue #103] `bunyan -L` (or `bunyan --time local`) to show local time.
67 Bunyan log records store `time` in UTC time. Sometimes it is convenient
68 to display in local time.
69
d412ece Trent Mick improve 'the bunyan cli has crashed' messaging
authored
70 - [issue #205] Fix the "The Bunyan CLI crashed!" checking to properly warn of
71 the common failure case when `-c CONDITION` is being used.
783b1c4 Trent Mick prep for future dev
authored
72
73
a70c0eb Trent Mick prepare for 1.2.4 release
authored
74 ## bunyan 1.2.4
79fc717 Trent Mick prep for future dev
authored
75
7c0b566 Trent Mick [issue #210] Export `bunyan.nameFromLevel` and `bunyan.levelFromName`
authored
76 - [issue #210] Export `bunyan.nameFromLevel` and `bunyan.levelFromName`. It can
77 be a pain for custom streams to have to reproduce that.
78
2f95bb8 Trent Mick Gracefully handle use of an unbound `Logger.{info,debug,...}`
authored
79 - [issue #100] Gracefully handle the case of an unbound
80 `Logger.{info,debug,...}` being used for logging, e.g.:
81
82 myEmittingThing.on('data', log.info)
83
84 Before this change, bunyan would throw. Now it emits a warning to stderr
85 *once*, and then silently ignores those log attempts, e.g.:
86
87 bunyan usage error: /Users/trentm/tm/node-bunyan/foo.js:12: attempt to log with an unbound log method: `this` is: { _events: { data: [Function] } }
79fc717 Trent Mick prep for future dev
authored
88
89
a86f20a Trent Mick prepare for 1.2.3 release
authored
90 ## bunyan 1.2.3
48a903c Trent Mick prep for future dev
authored
91
980e281 Trent Mick #185 add some comments, const, Daniel to authors, and changelog
authored
92 - [issue #184] Fix log rotation for rotation periods > ~25 days. Before this
93 change, a rotation period longer than this could hit [the maximum setTimeout
94 delay in node.js](https://github.com/joyent/node/issues/8656). By Daniel Juhl.
48a903c Trent Mick prep for future dev
authored
95
96
6bdf6d9 Trent Mick prepare for 1.2.2 release
authored
97 ## bunyan 1.2.2
e43a1a4 Trent Mick prep for future dev
authored
98
74a2a1c Trent Mick allow Logger level values outside TRACE..FATAL
authored
99 - Drop the guard that a bunyan Logger level must be between TRACE (10)
100 and FATAL (60), inclusive. This allows a trick of setting the level
101 to `FATAL + 1` to turn logging off. While the standard named log levels are
102 the golden path, then intention was not to get in the way of using
103 other level numbers.
e43a1a4 Trent Mick prep for future dev
authored
104
105
7aa8f73 Trent Mick prepare for 1.2.1 release
authored
106 ## bunyan 1.2.1
04de162 Trent Mick prep for future dev
authored
107
603ce3c Trent Mick Get at least dtrace-provider 0.3.1 for optionalDependencies
authored
108 - [issue #178, #181] Get at least dtrace-provider 0.3.1 for
109 optionalDependencies to get a fix for install with decoupled npm (e.g. with
110 homebrew's node and npm).
04de162 Trent Mick prep for future dev
authored
111
112
f21007d Trent Mick prepare for 1.2.0 release
authored
113 ## bunyan 1.2.0
6fc941c Trent Mick Restore dtrace-provider in optionalDependencies
authored
114
115 - [issue #157] Restore dtrace-provider as a dependency (in
116 "optionalDependencies").
117
118 Dtrace-provider version 0.3.0 add build sugar that should eliminate the
119 problems from older versions:
120 The build is not attempted on Linux and Windows. The build spew is
121 *not* emitted by default (use `V=1 npm install` to see it); instead a
980e281 Trent Mick #185 add some comments, const, Daniel to authors, and changelog
authored
122 short warning is emitted if the build fails.
123
6fc941c Trent Mick Restore dtrace-provider in optionalDependencies
authored
124 Also, importantly, the new dtrace-provider fixes working with node
125 v0.11/0.12.
5598700 Trent Mick prep for future dev
authored
126
127
6229405 Trent Mick prepare for 1.1.3 release
authored
128 ## bunyan 1.1.3
bd149b9 Trent Mick prep for future dev
authored
129
4455189 Trent Mick Include extra `err` fields in `bunyan` CLI output.
authored
130 - [issue #165] Include extra `err` fields in `bunyan` CLI output. Before
131 this change only the fields part of the typical node.js error stack
132 (err.stack, err.message, err.name) would be emitted, even though
133 the Bunyan *library* would typically include err.code and err.signal
134 in the raw JSON log record.
bd149b9 Trent Mick prep for future dev
authored
135
136
c23b369 Trent Mick prepare for 1.1.2 release
authored
137 ## bunyan 1.1.2
b9f347b Trent Mick prep for future dev
authored
138
a5ca41a Trent Mick Fix a breakage in `log.info(err)` on a logger with no serializers.
authored
139 - Fix a breakage in `log.info(err)` on a logger with no serializers.
b9f347b Trent Mick prep for future dev
authored
140
141
e5d8576 Trent Mick prepare for 1.1.1 release
authored
142 ## bunyan 1.1.1
9c150d9 Trent Mick prep for future dev
authored
143
a5ca41a Trent Mick Fix a breakage in `log.info(err)` on a logger with no serializers.
authored
144 Note: *Bad release.* It breaks `log.info(err)` on a logger with no serializers.
145 Use version 1.1.2.
146
6684393 Trent Mick Note Mihai's recent change.
authored
147 - [pull #168] Fix handling of `log.info(err)` to use the `log` Logger's `err`
148 serializer if it has one, instead of always using the core Bunyan err
149 serializer. (By Mihai Tomescu.)
9c150d9 Trent Mick prep for future dev
authored
150
151
75ade19 Trent Mick prepare for 1.1.0 release
authored
152 ## bunyan 1.1.0
cb703ef Trent Mick prep for future dev
authored
153
414f335 Trent Mick browserify support, bump ver to 1.1.0
authored
154 - [issue #162] Preliminary support for [browserify](http://browserify.org/).
155 See [the section in the README](../README.md#browserify).
cb703ef Trent Mick prep for future dev
authored
156
157
1093b07 Trent Mick prepare for 1.0.1 release
authored
158 ## bunyan 1.0.1
76bc7ac Trent Mick prep for future dev
authored
159
a3e7081 Trent Mick note recent change
authored
160 - [issues #105, #138, #151] Export `<Logger>.addStream(...)` and
161 `<Logger>.addSerializers(...)` to be able to add them after Logger creation.
162 Thanks @andreineculau!
163
2e1d85a Trent Mick note recent change
authored
164 - [issue #159] Fix bad handling in construtor guard intending to allow
165 creation without "new": `var log = Logger(...)`. Thanks @rmg!
166
6c6b6ea Trent Mick note recent change
authored
167 - [issue #156] Smaller install size via .npmignore file.
168
ecf4b8c Trent Mick Tweak to SIGINT patch from @jnordberg for #161
authored
169 - [issue #126, #161] Ignore SIGINT (Ctrl+C) when processing stdin. `...| bunyan`
170 should expect the preceding process in the pipeline to handle SIGINT. While
171 it is doing so, `bunyan` should continue to process any remaining output.
172 Thanks @timborodin and @jnordberg!
173
26a8bb0 Trent Mick Bright black "hides" some bunyan CLI styled text when using Solarized Da...
authored
174 - [issue #160] Stop using ANSI 'grey' in `bunyan` CLI output, because of the
175 problems that causes with Solarized Dark themes (see
176 <https://github.com/altercation/solarized/issues/220>).
76bc7ac Trent Mick prep for future dev
authored
177
178
b31cb3b Trent Mick prepare for 1.0.0 release
authored
179 ## bunyan 1.0.0
660b706 Trent Mick doc new -c CODE; drop dtrace-provider as optionalDependency (fixes #135)...
authored
180
181 - [issue #87] **Backward incompatible change to `-c CODE`** improving
182 performance by over 10x (good!), with a backward incompatible change to
183 semantics (unfortunate), and adding some sugar (good!).
184
185 The `-c CODE` implementation was changed to use a JS function for processing
186 rather than `vm.runInNewContext`. The latter was specatularly slow, so
187 won't be missed. Unfortunately this does mean a few semantic differences in
188 the `CODE`, the most noticeable of which is that **`this` is required to
189 access the object fields:**
190
191 # Bad. Works with bunyan 0.x but not 1.x.
192 $ bunyan -c 'pid === 123' foo.log
193 ...
194
195 # Good. Works with all versions of bunyan
196 $ bunyan -c 'this.pid === 123' foo.log
197 ...
198
199 The old behaviour of `-c` can be restored with the `BUNYAN_EXEC=vm`
200 environment variable:
201
202 $ BUNYAN_EXEC=vm bunyan -c 'pid === 123' foo.log
203 ...
204
205 Some sugar was also added: the TRACE, DEBUG, ... constants are defined, so
206 one can:
207
208 $ bunyan -c 'this.level >= ERROR && this.component === "http"' foo.log
209 ...
210
211 And example of the speed improvement on a 10 MiB log example:
212
213 $ time BUNYAN_EXEC=vm bunyan -c 'this.level === ERROR' big.log | cat >slow
214
215 real 0m6.349s
216 user 0m6.292s
217 sys 0m0.110s
218
219 $ time bunyan -c 'this.level === ERROR' big.log | cat >fast
220
221 real 0m0.333s
222 user 0m0.303s
223 sys 0m0.028s
224
225 The change was courtesy Patrick Mooney (https://github.com/pfmooney). Thanks!
226
227 - Add `bunyan -0 ...` shortcut for `bunyan -o bunyan ...`.
228
229 - [issue #135] **Backward incompatible.** Drop dtrace-provider even from
230 `optionalDependencies`. Dtrace-provider has proven a consistent barrier to
231 installing bunyan, because it is a binary dep. Even as an *optional* dep it
232 still caused confusion and install noise.
233
48cb962 Trent Mick tweak
authored
234 Users of Bunyan on dtrace-y platforms (SmartOS, Mac, Illumos, Solaris) will
235 need to manually `npm install dtrace-provider` themselves to get [Bunyan's
660b706 Trent Mick doc new -c CODE; drop dtrace-provider as optionalDependency (fixes #135)...
authored
236 dtrace support](https://github.com/trentm/node-bunyan#runtime-log-snooping-via-dtrace)
237 to work. If not installed, bunyan should stub it out properly.
865cec6 Trent Mick prep for future dev
authored
238
239
240
90d1405 Trent Mick prepare for 0.23.1 release
authored
241 ## bunyan 0.23.1
67b8bab Trent Mick prep for future dev
authored
242
1ad4a75 Trent Mick note contributors
authored
243 - [pull #125, pull #97, issue #73] Unref rotating-file timeout which was
244 preventing processes from exiting (by https://github.com/chakrit and
4670906 Trent Mick skip rotating-file test on node 0.8; warn about rotating-file issues
authored
245 https://github.com/glenn-murray-bse). Note: this only fixes the issue
246 for node 0.10 and above.
67b8bab Trent Mick prep for future dev
authored
247
248
20ba943 Trent Mick prepare for 0.23.0 release
authored
249 ## bunyan 0.23.0
9f3ef6b Trent Mick prep for future dev
authored
250
d305801 Trent Mick [issue #139] Fix `bunyan` crash on a log record with `res.header` that i...
authored
251 - [issue #139] Fix `bunyan` crash on a log record with `res.header` that is an
252 object. A side effect of this improvement is that a record with `res.statusCode`
253 but no header info will render a response block, for example:
254
255 [2012-08-08T10:25:47.637Z] INFO: my-service/12859 on my-host: some message (...)
256 ...
257 --
258 HTTP/1.1 200 OK
259 --
260 ...
261
71e5d1b Trent Mick note aexmachina's change, style tweaks for make check
authored
262 - [pull #42] Fix `bunyan` crash on a log record with `req.headers` that is a *string*
263 (by https://github.com/aexmachina).
264
fc0150f Trent Mick [issue #85] Ensure logging a non-object/non-string doesn't throw
authored
265 - Drop node 0.6 support. I can't effectively `npm install` with a node 0.6
266 anymore.
267
268 - [issue #85] Ensure logging a non-object/non-string doesn't throw (by
269 https://github.com/mhart). This changes fixes:
270
271 log.info(<bool>) # TypeError: Object.keys called on non-object
272 log.info(<function>) # "msg":"" (instead of wanted "msg":"[Function]")
273 log.info(<array>) # "msg":"" (instead of wanted "msg":util.format(<array>))
9f3ef6b Trent Mick prep for future dev
authored
274
275
f89d943 Trent Mick prepare for 0.22.3 release
authored
276 ## bunyan 0.22.3
5b9da22 Trent Mick prep for future dev
authored
277
111e142 Trent Mick bump rev to republish
authored
278 - Republish the same code to npm.
5b9da22 Trent Mick prep for future dev
authored
279
280
9cb9765 Trent Mick prepare for 0.22.2 release
authored
281 ## bunyan 0.22.2
0322832 Trent Mick prep for future dev
authored
282
111e142 Trent Mick bump rev to republish
authored
283 Note: Bad release. The published package in the npm registry got corrupted. Use 0.22.3 or later.
284
fc0150f Trent Mick [issue #85] Ensure logging a non-object/non-string doesn't throw
authored
285 - [issue #131] Allow `log.info(<number>)` and, most importantly, don't crash on that.
36f7e51 Trent Mick issue #131 Allow `log.info(<number>)` and, most importantly, don't crash...
authored
286
a689ca1 Trent Mick issue #128: Update 'mv' optional dep to latest.
authored
287 - Update 'mv' optional dep to latest.
0322832 Trent Mick prep for future dev
authored
288
289
24bc088 Trent Mick prepare for 0.22.1 release
authored
290 ## bunyan 0.22.1
06ade78 Trent Mick prep for future dev
authored
291
fc0150f Trent Mick [issue #85] Ensure logging a non-object/non-string doesn't throw
authored
292 - [issue #111] Fix a crash when attempting to use `bunyan -p` on a platform without
6208e87 Trent Mick #111 Fix a crash when attempting to use `bunyan -p` on a platform witho...
authored
293 dtrace.
294
fc0150f Trent Mick [issue #85] Ensure logging a non-object/non-string doesn't throw
authored
295 - [issue #101] Fix a crash in `bunyan` rendering a record with unexpected "res.headers".
06ade78 Trent Mick prep for future dev
authored
296
297
1630067 Trent Mick prepare for 0.22.0 release
authored
298 ## bunyan 0.22.0
27b679f Trent Mick prep for future dev
authored
299
fc0150f Trent Mick [issue #85] Ensure logging a non-object/non-string doesn't throw
authored
300 - [issue #104] `log.reopenFileStreams()` convenience method to be used with external log
89d5326 Trent Mick #101 Fix a crash in `bunyan` rendering a record with unexpected "res.he...
authored
301 rotation.
27b679f Trent Mick prep for future dev
authored
302
303
ec54cbb Trent Mick prepare for 0.21.4 release
authored
304 ## bunyan 0.21.4
8f7aff0 Trent Mick prep for future dev
authored
305
fc0150f Trent Mick [issue #85] Ensure logging a non-object/non-string doesn't throw
authored
306 - [issue #96] Fix `bunyan` to default to paging (with `less`) by default in node 0.10.0.
89d5326 Trent Mick #101 Fix a crash in `bunyan` rendering a record with unexpected "res.he...
authored
307 The intention has always been to default to paging for node >=0.8.
8f7aff0 Trent Mick prep for future dev
authored
308
309
5a866da Trent Mick prepare for 0.21.3 release
authored
310 ## bunyan 0.21.3
45dce56 Trent Mick prep for future dev
authored
311
3789aad Trent Mick changelog entry for #90
authored
312 - [issue #90] Fix `bunyan -p '*'` breakage in version 0.21.2.
45dce56 Trent Mick prep for future dev
authored
313
314
4899025 Trent Mick prepare for 0.21.2 release
authored
315 ## bunyan 0.21.2
b5e3bd2 Trent Mick prep for future dev
authored
316
3789aad Trent Mick changelog entry for #90
authored
317 **Note: Bad release. The switchrate change below broke `bunyan -p '*'` usage
318 (see issue #90). Use 0.21.3 or later.**
319
c938bc6 Trent Mick update changelog for pull#89
authored
320 - [issue #88] Should be able to efficiently combine "-l" with "-p *".
321
322 - Avoid DTrace buffer filling up, e.g. like this:
3fb3f23 Trent Mick amp switchrate to avoid Dtrace buffer filling up with 'bunyan -p ...'
authored
323
324 $ bunyan -p 42241 > /tmp/all.log
325 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
326 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
327 dtrace: 138 drops on CPU 4
328 ...
329
330 From Bryan: "the DTrace buffer is filling up because the string size is so
331 large... by increasing the switchrate, you're increasing the rate at
332 which that buffer is emptied."
b5e3bd2 Trent Mick prep for future dev
authored
333
334
f9c9834 Trent Mick prepare for 0.21.1 release
authored
335 ## bunyan 0.21.1
6841b8c Trent Mick prep for future dev
authored
336
d9f441a Trent Mick changelog for client_res
authored
337 - [pull #83] Support rendering 'client_res' key in bunyan CLI (by
338 github.com/mcavage).
6841b8c Trent Mick prep for future dev
authored
339
340
f2fa524 Trent Mick prepare for 0.21.0 release
authored
341 ## bunyan 0.21.0
2d2d39d Trent Mick prep for future dev
authored
342
c9f05b6 Trent Mick make check: prefer single-quote strings
authored
343 - 'make check' clean, 4-space indenting. No functional change here, just
344 lots of code change.
a51babe Trent Mick changelog entry for #80
authored
345 - [issue #80, #82] Drop assert that broke using 'rotating-file' with
346 a default `period` (by github.com/ricardograca).
2d2d39d Trent Mick prep for future dev
authored
347
348
5b35ca6 Trent Mick prepare for 0.20.0 release
authored
349 ## bunyan 0.20.0
1a8be0c Trent Mick OS-2030, smartos-live #184: fix serializer bug added in bunyan 0.18.3
authored
350
351 - [Slight backward incompatibility] Fix serializer bug introduced in 0.18.3
352 (see below) to only apply serializers to log records when appropriate.
353
354 This also makes a semantic change to custom serializers. Before this change
355 a serializer function was called for a log record key when that value was
356 truth-y. The semantic change is to call the serializer function as long
357 as the value is not `undefined`. That means that a serializer function
358 should handle falsey values such as `false` and `null`.
86a4a3e Trent Mick prep for future dev
authored
359
52cede7 Trent Mick changelog for mv update
authored
360 - Update to latest 'mv' dep (required for rotating-file support) to support
361 node v0.10.0.
86a4a3e Trent Mick prep for future dev
authored
362
363
0e18896 Trent Mick prepare for 0.19.0 release
authored
364 ## bunyan 0.19.0
3f6c2be Trent Mick change to 'err' serialization to NOT include extra err attributes: for s...
authored
365
1a8be0c Trent Mick OS-2030, smartos-live #184: fix serializer bug added in bunyan 0.18.3
authored
366 **WARNING**: This release includes a bug introduced in bunyan 0.18.3 (see
367 below). Please upgrade to bunyan 0.20.0.
368
3f6c2be Trent Mick change to 'err' serialization to NOT include extra err attributes: for s...
authored
369 - [Slight backward incompatibility] Change the default error serialization
370 (a.k.a. `bunyan.stdSerializers.err`) to *not* serialize all additional
371 attributes of the given error object. This is an open door to unsafe logging
372 and logging should always be safe. With this change, error serialization
373 will log these attributes: message, name, stack, code, signal. The latter
374 two are added because some core node APIs include those fields (e.g.
375 `child_process.exec`).
376
377 Concrete examples where this has hurt have been the "domain" change
378 necessitating 0.18.3 and a case where
379 [node-restify](https://github.com/mcavage/node-restify) uses an error object
380 as the response object. When logging the `err` and `res` in the same log
381 statement (common for restify audit logging), the `res.body` would be JSON
382 stringified as '[Circular]' as it had already been emitted for the `err` key.
383 This results in a WTF with the bunyan CLI because the `err.body` is not
384 rendered.
385
386 If you need the old behaviour back you will need to do this:
387
388 var bunyan = require('bunyan');
389 var errSkips = {
390 // Skip domain keys. `domain` especially can have huge objects that can
391 // OOM your app when trying to JSON.stringify.
392 domain: true,
393 domain_emitter: true,
394 domain_bound: true,
395 domain_thrown: true
396 };
397 bunyan.stdSerializers.err = function err(err) {
398 if (!err || !err.stack)
399 return err;
400 var obj = {
401 message: err.message,
402 name: err.name,
403 stack: getFullErrorStack(err)
404 }
405 Object.keys(err).forEach(function (k) {
406 if (err[k] !== undefined && !errSkips[k]) {
407 obj[k] = err[k];
408 }
409 });
410 return obj;
411 };
4152ea2 Trent Mick prep for future dev
authored
412
947705a Trent Mick 'long' and 'bunyan' output formats
authored
413 - "long" and "bunyan" output formats for the CLI. `bunyan -o long` is the default
414 format, the same as before, just called "long" now instead of the cheesy "paul"
3f6c2be Trent Mick change to 'err' serialization to NOT include extra err attributes: for s...
authored
415 name. The "bunyan" output format is the same as "json-0", just with a more
947705a Trent Mick 'long' and 'bunyan' output formats
authored
416 convenient name.
4152ea2 Trent Mick prep for future dev
authored
417
418
4efe30f Trent Mick prepare for 0.18.3 release
authored
419 ## bunyan 0.18.3
b2438dd Trent Mick prep for future dev
authored
420
1a8be0c Trent Mick OS-2030, smartos-live #184: fix serializer bug added in bunyan 0.18.3
authored
421 **WARNING**: This release introduced a bug such that all serializers are
422 applied to all log records even if the log record did not contain the key
423 for that serializer. If a logger serializer function does not handle
424 being given `undefined`, then you'll get warnings like this on stderr:
425
426 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: ...
427 at Object.bunyan.createLogger.serializers.foo (.../myapp.js:20:15)
428 at Logger._applySerializers (.../lib/bunyan.js:644:46)
429 at Array.forEach (native)
430 at Logger._applySerializers (.../lib/bunyan.js:640:33)
431 ...
432
433 and the following junk in written log records:
434
435 "foo":"(Error in Bunyan log "foo" serializer broke field. See stderr for details.)"
436
437 Please upgrade to bunyan 0.20.0.
438
439
f096b30 Trent Mick exclude domain keys on error objects for 'err' serializer
authored
440 - Change the `bunyan.stdSerializers.err` serializer for errors to *exclude*
441 [the "domain*" keys](http://nodejs.org/docs/latest/api/all.html#all_additions_to_error_objects).
442 `err.domain` will include its assigned members which can arbitrarily large
443 objects that are not intended for logging.
444
445 - Make the "dtrace-provider" dependency optional. I hate to do this, but
446 installing bunyan on Windows is made very difficult with this as a required
447 dep. Even though "dtrace-provider" stubs out for non-dtrace-y platforms,
448 without a compiler and Python around, node-gyp just falls over.
b2438dd Trent Mick prep for future dev
authored
449
450
6de3e42 Trent Mick prepare for 0.18.2 release
authored
451 ## bunyan 0.18.2
0a39334 Trent Mick prep for future dev
authored
452
573c33a Trent Mick changelog for recent stuff; 'DEBUG' was a dumb name for this internal va...
authored
453 - [pull #67] Remove debugging prints in rotating-file support.
454 (by github.com/chad3814).
455 - Update to dtrace-provider@0.2.7.
0a39334 Trent Mick prep for future dev
authored
456
457
3b66127 Trent Mick prepare for 0.18.1 release
authored
458 ## bunyan 0.18.1
acfe28b Trent Mick prep for future dev
authored
459
d1baeb1 Trent Mick some cases to not page automatically
authored
460 - Get the `bunyan` CLI to **not** automatically page (i.e. pipe to `less`)
461 if stdin isn't a TTY, or if following dtrace probe output (via `-p PID`),
462 or if not given log file arguments.
acfe28b Trent Mick prep for future dev
authored
463
464
2dee5dc Trent Mick prepare for 0.18.0 release
authored
465 ## bunyan 0.18.0
b1c143c Trent Mick bunyan CLI auto-paging
authored
466
467 - Automatic paging support in the `bunyan` CLI (similar to `git log` et al).
468 IOW, `bunyan` will open your pager (by default `less`) and pipe rendered
469 log output through it. A main benefit of this is getting colored logs with
470 a pager without the pain. Before you had to explicit use `--color` to tell
471 bunyan to color output when the output was not a TTY:
472
473 bunyan foo.log --color | less -R # before
474 bunyan foo.log # now
475
476 Disable with the `--no-pager` option or the `BUNYAN_NO_PAGER=1` environment
477 variable.
478
479 Limitations: Only supported for node >=0.8. Windows is not supported (at
480 least not yet).
e04f574 Trent Mick prep for future dev
authored
481
bd4dec5 Trent Mick move test suite to nodeunit
authored
482 - Switch test suite to nodeunit (still using a node-tap'ish API via
483 a helper).
e04f574 Trent Mick prep for future dev
authored
484
485
6f83138 Trent Mick prepare for 0.17.0 release
authored
486 ## bunyan 0.17.0
480ee5d Trent Mick log rotation support; v0.17.0; improve README docs
authored
487
61fa82e Trent Mick note that log rotation support was for issue #33
authored
488 - [issue #33] Log rotation support:
480ee5d Trent Mick log rotation support; v0.17.0; improve README docs
authored
489
490 var bunyan = require('bunyan');
491 var log = bunyan.createLogger({
492 name: 'myapp',
493 streams: [{
494 type: 'rotating-file',
495 path: '/var/log/myapp.log',
496 count: 7,
497 period: 'daily'
498 }]
499 });
500
c5bfdc4 Trent Mick prep for future dev
authored
501
cf38811 Trent Mick don't special case 'latency' in default CLI rendering of log records
authored
502 - Tweak to CLI default pretty output: don't special case "latency" field.
503 The special casing was perhaps nice, but less self-explanatory.
504 Before:
505
506 [2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (15ms, audit=true, bar=baz)
507 GET /foo
508 ...
509
510 After:
511
512 [2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (audit=true, bar=baz, latency=15)
513 GET /foo
514 ...
515
516 - *Exit* CLI on EPIPE, otherwise we sit there useless processing a huge log
517 file with, e.g. `bunyan huge.log | head`.
c5bfdc4 Trent Mick prep for future dev
authored
518
519
e52989d Trent Mick prepare for 0.16.8 release
authored
520 ## bunyan 0.16.8
9acc97e Trent Mick prep for future dev
authored
521
cfdb30e Trent Mick guards and UX for -c CONDITION usage
authored
522 - Guards on `-c CONDITION` usage to attempt to be more user friendly.
523 Bogus JS code will result in this:
524
525 $ bunyan portal.log -c 'this.req.username==boo@foo'
526 bunyan: error: illegal CONDITION code: SyntaxError: Unexpected token ILLEGAL
527 CONDITION script:
528 Object.prototype.TRACE = 10;
529 Object.prototype.DEBUG = 20;
530 Object.prototype.INFO = 30;
531 Object.prototype.WARN = 40;
532 Object.prototype.ERROR = 50;
533 Object.prototype.FATAL = 60;
534 this.req.username==boo@foo
535 Error:
536 SyntaxError: Unexpected token ILLEGAL
537 at new Script (vm.js:32:12)
538 at Function.Script.createScript (vm.js:48:10)
539 at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:465:27)
540 at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16)
541 at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3)
542 at Module._compile (module.js:449:26)
543 at Object.Module._extensions..js (module.js:467:10)
544 at Module.load (module.js:356:32)
545 at Function.Module._load (module.js:312:12)
546 at Module.runMain (module.js:492:10)
547
548 And all CONDITION scripts will be run against a minimal valid Bunyan
549 log record to ensure they properly guard against undefined values
550 (at least as much as can reasonably be checked). For example:
551
552 $ bunyan portal.log -c 'this.req.username=="bob"'
553 bunyan: error: CONDITION code cannot safely filter a minimal Bunyan log record
554 CONDITION script:
555 Object.prototype.TRACE = 10;
556 Object.prototype.DEBUG = 20;
557 Object.prototype.INFO = 30;
558 Object.prototype.WARN = 40;
559 Object.prototype.ERROR = 50;
560 Object.prototype.FATAL = 60;
561 this.req.username=="bob"
562 Minimal Bunyan log record:
563 {
564 "v": 0,
565 "level": 30,
566 "name": "name",
567 "hostname": "hostname",
568 "pid": 123,
569 "time": 1355514346206,
570 "msg": "msg"
571 }
572 Filter error:
573 TypeError: Cannot read property 'username' of undefined
574 at bunyan-condition-0:7:9
575 at Script.Object.keys.forEach.(anonymous function) [as runInNewContext] (vm.js:41:22)
576 at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:477:18)
577 at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16)
578 at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3)
579 at Module._compile (module.js:449:26)
580 at Object.Module._extensions..js (module.js:467:10)
581 at Module.load (module.js:356:32)
582 at Function.Module._load (module.js:312:12)
583 at Module.runMain (module.js:492:10)
584
585 A proper way to do that condition would be:
586
587 $ bunyan portal.log -c 'this.req && this.req.username=="bob"'
588
9acc97e Trent Mick prep for future dev
authored
589
590
5210c66 Trent Mick prepare for 0.16.7 release
authored
591 ## bunyan 0.16.7
af002db Trent Mick prep for future dev
authored
592
70f8d4d Trent Mick [issue #59] Clear a possibly interrupted ANSI color code on signal termi...
authored
593 - [issue #59] Clear a possibly interrupted ANSI color code on signal
594 termination.
af002db Trent Mick prep for future dev
authored
595
596
b5c0f7f Trent Mick prepare for 0.16.6 release
authored
597 ## bunyan 0.16.6
9d7bd77 Trent Mick prep for future dev
authored
598
f08c2e6 Trent Mick issue #56: bunyan -p NAME
authored
599 - [issue #56] Support `bunyan -p NAME` to dtrace all PIDs matching 'NAME' in
600 their command and args (using `ps -A -o pid,command | grep NAME` or, on SunOS
601 `pgrep -lf NAME`). E.g.:
602
603 bunyan -p myappname
604
605 This is useful for usage of node's [cluster
606 module](http://nodejs.org/docs/latest/api/all.html#all_cluster) where you'll
607 have multiple worker processes.
9d7bd77 Trent Mick prep for future dev
authored
608
609
262e4f4 Trent Mick prepare for 0.16.5 release
authored
610 ## bunyan 0.16.5
3869ee3 Trent Mick prep for future dev
authored
611
918c808 Trent Mick bunyan -p '*'
authored
612 - Allow `bunyan -p '*'` to capture bunyan dtrace probes from **all** processes.
6869931 Trent Mick issue #55: add BUNYAN_NO_COLOR envvar support
authored
613 - issue #55: Add support for `BUNYAN_NO_COLOR` environment variable to
614 turn off all output coloring. This is still overridden by the `--color`
615 and `--no-color` options.
3869ee3 Trent Mick prep for future dev
authored
616
617
0bddaeb Trent Mick prepare for 0.16.4 release
authored
618 ## bunyan 0.16.4
7166772 Trent Mick prep for future dev
authored
619
69285c7 Trent Mick issue #54: fix stderr flushing of dtrace child proc (again)
authored
620 - issue #54: Ensure (again, see 0.16.2) that stderr from the dtrace child
621 process (when using `bunyan -p PID`) gets through. There had been a race
622 between exiting bunyan and the flushing of the dtrace process' stderr.
7166772 Trent Mick prep for future dev
authored
623
624
59df6b2 Trent Mick prepare for 0.16.3 release
authored
625 ## bunyan 0.16.3
7e20b2d Trent Mick prep for future dev
authored
626
da55eee Trent Mick back to dtrace-provider dep
authored
627 - Drop 'trentm-dtrace-provider' fork dep now that
628 <https://github.com/chrisa/node-dtrace-provider/pull/24> has been resolved.
629 Back to dtrace-provider.
7e20b2d Trent Mick prep for future dev
authored
630
631
b453eb8 Trent Mick prepare for 0.16.2 release
authored
632 ## bunyan 0.16.2
d133def Trent Mick prep for future dev
authored
633
44fc428 Trent Mick ensure dtrace stderr is piped through
authored
634 - Ensure that stderr from the dtrace child process (when using `bunyan -p PID`)
635 gets through. The `pipe` usage wasn't working on SmartOS. This is important
636 to show the user if they need to 'sudo'.
d133def Trent Mick prep for future dev
authored
637
638
4013f7a Trent Mick prepare for 0.16.1 release
authored
639 ## bunyan 0.16.1
77b556d Trent Mick prep for future dev
authored
640
4d0f6ae Trent Mick ensure termination of child dtrace on CLI term by a signal
authored
641 - Ensure that a possible dtrace child process (with using `bunyan -p PID`) is
642 terminated on signal termination of the bunyan CLI (at least for SIGINT,
643 SIGQUIT, SIGTERM, SIGHUP).
77b556d Trent Mick prep for future dev
authored
644
645
8d67988 Trent Mick prepare for 0.16.0 release
authored
646 ## bunyan 0.16.0
c277e1d Trent Mick prep for future dev
authored
647
79e5ded Trent Mick 'bunyan -p PID' support
authored
648 - Add `bunyan -p PID` support. This is a convenience wrapper that effectively
649 calls:
650
651 dtrace -x strsize=4k -qn 'bunyan$PID:::log-*{printf("%s", copyinstr(arg0))}' | bunyan
c277e1d Trent Mick prep for future dev
authored
652
653
7a62928 Trent Mick prepare for 0.15.0 release
authored
654 ## bunyan 0.15.0
3ef4660 Trent Mick prep for future dev
authored
655
8732764 Trent Mick issue #48: changelog, add Bryan to AUTHORS, basic dtrace test suite
authored
656 - issue #48: Dtrace support! The elevator pitch is you can watch all logging
899a342 Trent Mick better pitch for the dtrace support
authored
657 from all Bunyan-using process with something like this:
8732764 Trent Mick issue #48: changelog, add Bryan to AUTHORS, basic dtrace test suite
authored
658
659 dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%d: %s: %s", pid, probefunc, copyinstr(arg0))}'
660
899a342 Trent Mick better pitch for the dtrace support
authored
661 And this can include log levels *below* what the service is actually configured
662 to log. E.g. if the service is only logging at INFO level and you need to see
663 DEBUG log messages, with this you can. Obviously this only works on dtrace-y
664 platforms: Illumos derivatives of SunOS (e.g. SmartOS, OmniOS), Mac, FreeBSD.
665
666 Or get the bunyan CLI to render logs nicely:
8732764 Trent Mick issue #48: changelog, add Bryan to AUTHORS, basic dtrace test suite
authored
667
668 dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%s", copyinstr(arg0))}' | bunyan
669
670 See <https://github.com/trentm/node-bunyan#dtrace-support> for details. By
671 Bryan Cantrill.
3ef4660 Trent Mick prep for future dev
authored
672
673
e79065f Trent Mick prepare for 0.14.6 release
authored
674 ## bunyan 0.14.6
8223e43 Trent Mick prep for future dev
authored
675
5f9cdc3 Trent Mick export bunyan.safeCycles
authored
676 - Export `bunyan.safeCycles()`. This may be useful for custom `type == "raw"`
677 streams that may do JSON stringification of log records themselves. Usage:
678
679 var str = JSON.stringify(rec, bunyan.safeCycles());
680
677a485 Trent Mick [issue #49] Allow a `log.child()` to specify the level of inherited stre...
authored
681 - [issue #49] Allow a `log.child()` to specify the level of inherited streams.
682 For example:
683
684 # Before
685 var childLog = log.child({...});
686 childLog.level('debug');
687
688 # After
689 var childLog = log.child({..., level: 'debug'});
690
8732764 Trent Mick issue #48: changelog, add Bryan to AUTHORS, basic dtrace test suite
authored
691 - Improve the Bunyan CLI crash message to make it easier to provide relevant
692 details in a bug report.
8223e43 Trent Mick prep for future dev
authored
693
694
be4909a Trent Mick prepare for 0.14.5 release
authored
695 ## bunyan 0.14.5
4ef6d4d Trent Mick prep for future dev
authored
696
e203c9f Trent Mick fix long-stack-trace error serialization added in 0.14.4
authored
697 - Fix a bug in the long-stack-trace error serialization added in 0.14.4. The
698 symptom:
699
700 bunyan@0.14.4: .../node_modules/bunyan/lib/bunyan.js:1002
701 var ret = ex.stack || ex.toString();
702 ^
703 TypeError: Cannot read property 'stack' of undefined
704 at getFullErrorStack (.../node_modules/bunyan/lib/bunyan.js:1002:15)
705 ...
4ef6d4d Trent Mick prep for future dev
authored
706
707
883c037 Trent Mick prepare for 0.14.4 release
authored
708 ## bunyan 0.14.4
4944285 Trent Mick prep for future dev
authored
709
31fda08 Trent Mick note the bad release
authored
710 - **Bad release. Use 0.14.5 instead.**
79fe9cd Trent Mick Improve error serialization to walk the chain of `.cause()` errors
authored
711 - Improve error serialization to walk the chain of `.cause()` errors
835e945 Trent Mick minor edit
authored
712 from the likes of `WError` or `VError` error classes from
79fe9cd Trent Mick Improve error serialization to walk the chain of `.cause()` errors
authored
713 [verror](https://github.com/davepacheco/node-verror) and
9e2a6bc Trent Mick fix a bad error in 0.14.3
authored
714 [restify v2.0](https://github.com/mcavage/node-restify). Example:
715
716 [2012-10-11T00:30:21.871Z] ERROR: imgapi/99612 on 0525989e-2086-4270-b960-41dd661ebd7d: my-message
717 ValidationFailedError: my-message; caused by TypeError: cause-error-message
718 at Server.apiPing (/opt/smartdc/imgapi/lib/app.js:45:23)
719 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
720 at Server.setupReq (/opt/smartdc/imgapi/lib/app.js:178:9)
721 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
722 at Server.parseBody (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/body_parser.js:15:33)
723 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
724 at Server.parseQueryString (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/query.js:40:25)
725 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
726 at Server._run (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:579:17)
727 at Server._handle.log.trace.req (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:480:38)
728 Caused by: TypeError: cause-error-message
729 at Server.apiPing (/opt/smartdc/imgapi/lib/app.js:40:25)
730 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
731 at Server.setupReq (/opt/smartdc/imgapi/lib/app.js:178:9)
732 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
733 at Server.parseBody (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/body_parser.js:15:33)
734 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
735 at Server.parseQueryString (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/query.js:40:25)
736 at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50)
737 at Server._run (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:579:17)
738 at Server._handle.log.trace.req (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:480:38)
240f04a Trent Mick prep for future dev
authored
739
740
60c6743 Trent Mick prepare for 0.14.2 release
authored
741 ## bunyan 0.14.2
46c6325 Trent Mick prep for future dev
authored
742
8a7d743 Trent Mick [issue #45] Fix bunyan CLI (default output mode) to not crash on a 'res'...
authored
743 - [issue #45] Fix bunyan CLI (default output mode) to not crash on a 'res'
744 field that isn't a response object, but a string.
46c6325 Trent Mick prep for future dev
authored
745
746
3558244 Trent Mick prepare for 0.14.1 release
authored
747 ## bunyan 0.14.1
d96b1c7 Trent Mick prep for future dev
authored
748
6c61112 Trent Mick [issue #44] Fix the default `bunyan` CLI output of a `res.body` that is ...
authored
749 - [issue #44] Fix the default `bunyan` CLI output of a `res.body` that is an
750 object instead of a string. See issue#38 for the same with `req.body`.
d96b1c7 Trent Mick prep for future dev
authored
751
752
60bbab8 Trent Mick prepare for 0.14.0 release
authored
753 ## bunyan 0.14.0
25fe445 Trent Mick prep for future dev
authored
754
830ae26 Trent Mick v0.14.0 bump for safe JSON.stringify change
authored
755 - [pull #41] Safe `JSON.stringify`ing of emitted log records to avoid blowing
756 up on circular objects (by Isaac Schlueter).
25fe445 Trent Mick prep for future dev
authored
757
758
5f03bda Trent Mick prepare for 0.13.5 release
authored
759 ## bunyan 0.13.5
e473756 Trent Mick prep for future dev
authored
760
44c54f4 Trent Mick [issue #39] Fix a bug with `client_req` handling in the default output o...
authored
761 - [issue #39] Fix a bug with `client_req` handling in the default output
762 of the `bunyan` CLI.
e473756 Trent Mick prep for future dev
authored
763
764
2d33cb0 Trent Mick prepare for 0.13.4 release
authored
765 ## bunyan 0.13.4
8d431c4 Trent Mick prep for future dev
authored
766
ee6714b Trent Mick [issue #38] Fix the default `bunyan` CLI output of a `req.body` that is ...
authored
767 - [issue #38] Fix the default `bunyan` CLI output of a `req.body` that is an
768 object instead of a string.
8d431c4 Trent Mick prep for future dev
authored
769
770
3d0697c Trent Mick prepare for 0.13.3 release
authored
771 ## bunyan 0.13.3
8cfdd8b Trent Mick prep for future dev
authored
772
db836e2 Trent Mick Export `bunyan.resolveLevel(NAME-OR-NUM)` to resolve a level name or num...
authored
773 - Export `bunyan.resolveLevel(NAME-OR-NUM)` to resolve a level name or number
774 to its log level number value:
835e945 Trent Mick minor edit
authored
775
db836e2 Trent Mick Export `bunyan.resolveLevel(NAME-OR-NUM)` to resolve a level name or num...
authored
776 > bunyan.resolveLevel('INFO')
777 30
778 > bunyan.resolveLevel('debug')
779 20
835e945 Trent Mick minor edit
authored
780
db836e2 Trent Mick Export `bunyan.resolveLevel(NAME-OR-NUM)` to resolve a level name or num...
authored
781 A side-effect of this change is that the uppercase level name is now allowed
782 in the logger constructor.
8cfdd8b Trent Mick prep for future dev
authored
783
784
eaf5008 Trent Mick prepare for 0.13.2 release
authored
785 ## bunyan 0.13.2
d3dc7df Trent Mick prep for future dev
authored
786
121b360 Trent Mick [issue #35] Ensure that an accidental `log.info(BUFFER)`, where BUFFER i...
authored
787 - [issue #35] Ensure that an accidental `log.info(BUFFER)`, where BUFFER is
788 a node.js Buffer object, doesn't blow up.
d3dc7df Trent Mick prep for future dev
authored
789
790
1bd584a Trent Mick prepare for 0.13.1 release
authored
791 ## bunyan 0.13.1
525fdb1 Trent Mick prep for future dev
authored
792
1a9e712 Trent Mick [issue #34] `body` et al in request/response output by `bunyan` CLI
authored
793 - [issue #34] Ensure `req.body`, `res.body` and other request/response fields
794 are emitted by the `bunyan` CLI (mostly by Rob Gulewich).
795
525fdb1 Trent Mick prep for future dev
authored
796
797
7127d51 Trent Mick prepare for 0.13.0 release
authored
798 ## bunyan 0.13.0
01c652b Trent Mick prep for future dev
authored
799
31d7e34 Trent Mick issue #31: foudn a solution to the bleeding defines using idea from dap....
authored
800 - [issue #31] Re-instate defines for the (uppercase) log level names (TRACE,
801 DEBUG, etc.) in `bunyan -c "..."` filtering condition code. E.g.:
802
803 $ ... | bunyan -c 'level >= ERROR'
01c652b Trent Mick prep for future dev
authored
804
805
ee61228 Trent Mick prepare for 0.12.0 release
authored
806 ## bunyan 0.12.0
543b68b Trent Mick prep for future dev
authored
807
c7e9987 Trent Mick rev to 0.12.0 and note the '-o short' change
authored
808 - [pull #32] `bunyan -o short` for more concise output (by Dave Pacheco). E.g.:
809
810 22:56:52.856Z INFO myservice: My message
811
812 instead of:
813
814 [2012-02-08T22:56:52.856Z] INFO: myservice/123 on example.com: My message
543b68b Trent Mick prep for future dev
authored
815
816
64112ee Trent Mick prepare for 0.11.3 release
authored
817 ## bunyan 0.11.3
19bc3ce Trent Mick prep for future dev
authored
818
4ad39fe Trent Mick '--strict' option for CLI
authored
819 - Add '--strict' option to `bunyan` CLI to suppress all but legal Bunyan JSON
820 log lines. By default non-JSON, and non-Bunyan lines are passed through.
19bc3ce Trent Mick prep for future dev
authored
821
822
208b949 Trent Mick prepare for 0.11.2 release
authored
823 ## bunyan 0.11.2
02d72b0 Trent Mick prep for future dev
authored
824
f0a119a Trent Mick [issue #30] Robust handling of 'req' field without a 'headers' subfield ...
authored
825 - [issue #30] Robust handling of 'req' field without a 'headers' subfield
826 in `bunyan` CLI.
cfa64e9 Trent Mick issue #31: DEBUG et al defines in '-c' scripts bleed into log records
authored
827 - [issue #31] Pull the TRACE, DEBUG, et al defines from `bunyan -c "..."`
828 filtering code. This was added in v0.11.1, but has a significant adverse
829 affect.
02d72b0 Trent Mick prep for future dev
authored
830
831
67da837 Trent Mick prepare for 0.11.1 release
authored
832 ## bunyan 0.11.1
6c26bf0 Trent Mick prep for future dev
authored
833
156d2c4 Trent Mick bad release
authored
834 - **Bad release. The TRACE et al names are bleeding into the log records
835 when using '-c'.**
0620b27 Trent Mick TRACE, DEBUG, et al in `bunayn -c "..."` filter code.
authored
836 - Add defines for the (uppercase) log level names (TRACE, DEBUG, etc.) in
837 `bunyan -c "..."` filtering condition code. E.g.:
838
839 $ ... | bunyan -c 'level >= ERROR'
6c26bf0 Trent Mick prep for future dev
authored
840
841
8ae15c9 Trent Mick prepare for 0.11.0 release
authored
842 ## bunyan 0.11.0
dd94067 Trent Mick prep for future dev
authored
843
f3fcc9c Trent Mick Bump to v0.11.0. Change log update. Some -h output tweak.
authored
844 - [pull #29] Add -l/--level for level filtering, and -c/--condition for
845 arbitrary conditional filtering (by github.com/isaacs):
846
847 $ ... | bunyan -l error # filter out log records below error
848 $ ... | bunyan -l 50 # numeric value works too
849 $ ... | bunyan -c 'level===50' # equiv with -c filtering
850 $ ... | bunyan -c 'pid===123' # filter on any field
851 $ ... | bunyan -c 'pid===123' -c '_audit' # multiple filters
dd94067 Trent Mick prep for future dev
authored
852
853
c872a2a Trent Mick prepare for 0.10.0 release
authored
854 ## bunyan 0.10.0
efab2b0 Trent Mick prep for future dev
authored
855
27a035f Trent Mick rev to 0.10.0 and add changelog for mhart's gzip addition
authored
856 - [pull #24] Support for gzip'ed log files in the bunyan CLI (by
857 github.com/mhart):
858
859 $ bunyan foo.log.gz
860 ...
efab2b0 Trent Mick prep for future dev
authored
861
862
8873f16 Trent Mick prepare for 0.9.0 release
authored
863 ## bunyan 0.9.0
c5ba5c0 Trent Mick support for 'raw' streams
authored
864
66afe81 Trent Mick [pull #16] Bullet proof the `bunyan.stdSerializers`
authored
865 - [pull #16] Bullet proof the `bunyan.stdSerializers` (by github.com/rlidwka).
866
9f8281e Trent Mick changelog entries for dap's additions
authored
867 - [pull #15] The `bunyan` CLI will now chronologically merge multiple log
868 streams when it is given multiple file arguments. (by github.com/davepacheco)
869
870 $ bunyan foo.log bar.log
871 ... merged log records ...
872
873 - [pull #15] A new `bunyan.RingBuffer` stream class that is useful for
874 keeping the last N log messages in memory. This can be a fast way to keep
875 recent, and thus hopefully relevant, log messages. (by @dapsays,
876 github.com/davepacheco)
877
37a1447 Trent Mick per issue #8 change the way a raw stream is handled
authored
878 Potential uses: Live debugging if a running process could inspect those
879 messages. One could dump recent log messages at a finer log level than is
880 typically logged on
9f8281e Trent Mick changelog entries for dap's additions
authored
881 [`uncaughtException`](http://nodejs.org/docs/latest/api/all.html#all_event_uncaughtexception).
882
883 var ringbuffer = new bunyan.RingBuffer({ limit: 100 });
884 var log = new bunyan({
37a1447 Trent Mick per issue #8 change the way a raw stream is handled
authored
885 name: 'foo',
886 streams: [{
887 type: 'raw',
888 stream: ringbuffer,
889 level: 'debug'
890 }]
9f8281e Trent Mick changelog entries for dap's additions
authored
891 });
892
893 log.info('hello world');
1eed1fa Trent Mick use RingBuffer.records instead of RingBuffer.enties (related to pull #15...
authored
894 console.log(ringbuffer.records);
9f8281e Trent Mick changelog entries for dap's additions
authored
895
c5ba5c0 Trent Mick support for 'raw' streams
authored
896 - Add support for "raw" streams. This is a logging stream that is given
897 raw log record objects instead of a JSON-stringified string.
898
899 function Collector() {
900 this.records = [];
901 }
902 Collector.prototype.write = function (rec) {
903 this.records.push(rec);
904 }
905 var log = new Logger({
906 name: 'mylog',
37a1447 Trent Mick per issue #8 change the way a raw stream is handled
authored
907 streams: [{
908 type: 'raw',
909 stream: new Collector()
910 }]
c5ba5c0 Trent Mick support for 'raw' streams
authored
911 });
912
9f8281e Trent Mick changelog entries for dap's additions
authored
913 See "examples/raw-stream.js". I expect raw streams to be useful for
37a1447 Trent Mick per issue #8 change the way a raw stream is handled
authored
914 piping Bunyan logging to separate services (e.g. <http://www.loggly.com/>,
9f8281e Trent Mick changelog entries for dap's additions
authored
915 <https://github.com/etsy/statsd>) or to separate in-process handling.
80c009a Trent Mick prep for future dev
authored
916
37a1447 Trent Mick per issue #8 change the way a raw stream is handled
authored
917 - Add test/corpus/*.log files (accidentally excluded) so the test suite
918 actually works(!).
80c009a Trent Mick prep for future dev
authored
919
920
9e251a5 Trent Mick prepare for 0.8.0 release
authored
921 ## bunyan 0.8.0
858150b Trent Mick pull #21: some style tweaks, add stream to error event args, test case, ...
authored
922
923 - [pull #21] Bunyan loggers now re-emit `fs.createWriteStream` error events.
924 By github.com/EvanOxfeld. See "examples/handle-fs-error.js" and
925 "test/error-event.js" for details.
926
927 var log = new Logger({name: 'mylog', streams: [{path: FILENAME}]});
928 log.on('error', function (err, stream) {
929 // Handle error writing to or creating FILENAME.
930 });
13b36fb Trent Mick prep for future dev
authored
931
4f28afc Trent Mick note it
authored
932 - jsstyle'ing (via `make check`)
13b36fb Trent Mick prep for future dev
authored
933
934
2daf47c Trent Mick prepare for 0.7.0 release
authored
935 ## bunyan 0.7.0
6e0d1ec Trent Mick prep for future dev
authored
936
c7d5f8b Trent Mick [issue #12] Add `bunyan.createLogger(OPTIONS)` form, as is more typical ...
authored
937 - [issue #12] Add `bunyan.createLogger(OPTIONS)` form, as is more typical in
938 node.js APIs. This'll eventually become the preferred form.
6e0d1ec Trent Mick prep for future dev
authored
939
940
6d9aa4f Trent Mick prepare for 0.6.9 release
authored
941 ## bunyan 0.6.9
fcbecef Trent Mick prep for future dev
authored
942
8f1c8ad Trent Mick color 'src' info red in default bunyan CLI coloring
authored
943 - Change `bunyan` CLI default output to color "src" info red. Before the "src"
944 information was uncolored. The "src" info is the filename, line number and
945 function name resulting from using `src: true` in `Logger` creation. I.e.,
946 the `(/Users/trentm/tm/node-bunyan/examples/hi.js:10)` in:
947
948 [2012-04-10T22:28:58.237Z] INFO: myapp/39339 on banana.local (/Users/trentm/tm/node-bunyan/examples/hi.js:10): hi
949
ea39bf0 Trent Mick Bunyan CLI tweak to show an 'err' field that doesn't have a 'stack'.
authored
950 - Tweak `bunyan` CLI default output to still show an "err" field if it doesn't
951 have a "stack" attribute.
952
fcbecef Trent Mick prep for future dev
authored
953
d4bbc70 Trent Mick prepare for 0.6.8 release
authored
954 ## bunyan 0.6.8
993f9d8 Trent Mick prep for future dev
authored
955
8ea2533 Trent Mick Fix bad bug with the "fast child" path: `log.child({...}, true)`.
authored
956 - Fix bad bug in `log.child({...}, true);` where the added child fields **would
957 be added to the parent's fields**. This bug only existed for the "fast child"
958 path (that second `true` argument). A side-effect of fixing this is that
959 the "fast child" path is only 5 times as fast as the regular `log.child`,
960 instead of 10 times faster.
961
993f9d8 Trent Mick prep for future dev
authored
962
cfa6d92 Trent Mick prepare for 0.6.7 release
authored
963 ## bunyan 0.6.7
a834151 Trent Mick prep for future dev
authored
964
9f8f6e7 Trent Mick changelog message for Mike's pull
authored
965 - [issue #6] Fix bleeding 'type' var to global namespace. (Thanks Mike!)
966
a834151 Trent Mick prep for future dev
authored
967
dd14781 Trent Mick prepare for 0.6.6 release
authored
968 ## bunyan 0.6.6
77b99b6 Trent Mick prep for future dev
authored
969
9feb9c8 Trent Mick CLI file args: bunyan foo.log bar.log
authored
970 - Add support to the `bunyan` CLI taking log file path args, `bunyan foo.log`,
971 in addition to the usual `cat foo.log | bunyan`.
972 - Improve reliability of the default output formatting of the `bunyan` CLI.
973 Before it could blow up processing log records missing some expected
974 fields.
975
77b99b6 Trent Mick prep for future dev
authored
976
d49bee3 Trent Mick prepare for 0.6.5 release
authored
977 ## bunyan 0.6.5
b52b1b6 Trent Mick prep for future dev
authored
978
92a2e9d Trent Mick colored bunyan CLI output, and --color option
authored
979 - ANSI coloring output from `bunyan` CLI tool (for the default output mode/style).
980 Also add the '--color' option to force coloring if the output stream is not
887f407 Trent Mick --no-color option
authored
981 a TTY, e.g. `cat my.log | bunyan --color | less -R`. Use `--no-color` to
982 disable coloring, e.g. if your terminal doesn't support ANSI codes.
983 - Add 'level' field to log record before custom fields for that record. This
984 just means that the raw record JSON will show the 'level' field earlier,
985 which is a bit nicer for raw reading.
0f02707 Trent Mick put 'level' field earlier in record
authored
986
b52b1b6 Trent Mick prep for future dev
authored
987
d0fb966 Trent Mick prepare for 0.6.4 release
authored
988 ## bunyan 0.6.4
40ec83b Trent Mick [issue #5] Fix `log.info() -> boolean` to work properly. Previous all we...
authored
989
990 - [issue #5] Fix `log.info() -> boolean` to work properly. Previous all were
991 returning false. Ditto all trace/debug/.../fatal methods.
992
993
39920c5 Trent Mick prepare for 0.6.3 release
authored
994 ## bunyan 0.6.3
38ea773 Trent Mick prep for future dev
authored
995
519f263 Trent Mick Allow an optional `msg` and arguments to the `log.info(<Error> err)` log...
authored
996 - Allow an optional `msg` and arguments to the `log.info(<Error> err)` logging
997 form. For example, before:
998
999 log.debug(my_error_instance) // good
1000 log.debug(my_error_instance, "boom!") // wasn't allowed
1001
1002 Now the latter is allowed if you want to expliciting set the log msg. Of course
1003 this applies to all the `log.{trace|debug|info...}()` methods.
1004
61ff403 Trent Mick clearer output for fields with spaces or empty string in bunyan cli outp...
authored
1005 - `bunyan` cli output: clarify extra fields with quoting if empty or have
1006 spaces. E.g. 'cmd' and 'stderr' in the following:
1007
1008 [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")
1009
38ea773 Trent Mick prep for future dev
authored
1010
5e12452 Trent Mick prepare for 0.6.2 release
authored
1011 ## bunyan 0.6.2
5361795 Trent Mick prep for future dev
authored
1012
a14cea4 Trent Mick changelog for npm publish guard
authored
1013 - Fix/guard against unintended inclusion of some files in npm published package
1014 due to <https://github.com/isaacs/npm/issues/2144>
1015
5361795 Trent Mick prep for future dev
authored
1016
aa52789 Trent Mick prepare for 0.6.1 release
authored
1017 ## bunyan 0.6.1
9c8f4e1 Trent Mick prep for future dev
authored
1018
8c0e3ab Trent Mick npmignore to avoid crud in published packages
authored
1019 - Internal: starting jsstyle usage.
1020 - Internal: add .npmignore. Previous packages had reams of bunyan crud in them.
1021
9c8f4e1 Trent Mick prep for future dev
authored
1022
de2b661 Trent Mick prepare for 0.6.0 release
authored
1023 ## bunyan 0.6.0
c12a90a Trent Mick issue #4: add 'pid' automatic log record field
authored
1024
1025 - Add 'pid' automatic log record field.
e8581c5 Trent Mick prep for future dev
authored
1026
1027
7f262ba Trent Mick prepare for 0.5.3 release
authored
1028 ## bunyan 0.5.3
63f97b8 Trent Mick prep for future dev
authored
1029
dda4603 Trent Mick mention 'client_req' in changelog
authored
1030 - Add 'client_req' (HTTP client request) standard formatting in `bunyan` CLI
1031 default output.
d531072 Trent Mick bunyan CLI output includes all keys
authored
1032 - Improve `bunyan` CLI default output to include *all* log record keys. Unknown keys
1033 are either included in the first line parenthetical (if short) or in the indented
1034 subsequent block (if long or multiline).
1035
63f97b8 Trent Mick prep for future dev
authored
1036
768b2de Trent Mick prepare for 0.5.2 release
authored
1037 ## bunyan 0.5.2
a8b054e Trent Mick prep for future dev
authored
1038
9f5581b Trent Mick issue #3: more type checking of Logger ctor options and log.child option...
authored
1039 - [issue #3] More type checking of `new Logger(...)` and `log.child(...)`
1040 options.
450e4eb Trent Mick start a test suite
authored
1041 - Start a test suite.
1042
a8b054e Trent Mick prep for future dev
authored
1043
74f3787 Trent Mick prepare for 0.5.1 release
authored
1044 ## bunyan 0.5.1
969ac69 Trent Mick prep for future dev
authored
1045
3649708 Trent Mick note issue #2 for this
authored
1046 - [issue #2] Add guard on `JSON.stringify`ing of log records before emission.
1047 This will prevent `log.info` et al throwing on record fields that cannot be
1048 represented as JSON. An error will be printed on stderr and a clipped log
1049 record emitted with a 'bunyanMsg' key including error details. E.g.:
887f407 Trent Mick --no-color option
authored
1050
1a0cd4b Trent Mick issue #2: Add guard on `JSON.stringify`ing of log records before emissio...
authored
1051 bunyan: ERROR: could not stringify log record from /Users/trentm/tm/node-bunyan/examples/unstringifyable.js:12: TypeError: Converting circular structure to JSON
1052 {
1053 "name": "foo",
1054 "hostname": "banana.local",
1055 "bunyanMsg": "bunyan: ERROR: could not stringify log record from /Users/trentm/tm/node-bunyan/examples/unstringifyable.js:12: TypeError: Converting circular structure to JSON",
1056 ...
1057
887f407 Trent Mick --no-color option
authored
1058 Some timing shows this does effect log speed:
1059
1a0cd4b Trent Mick issue #2: Add guard on `JSON.stringify`ing of log records before emissio...
authored
1060 $ node tools/timeguard.js # before
1061 Time try/catch-guard on JSON.stringify:
1062 - log.info: 0.07365ms per iteration
1063 $ node tools/timeguard.js # after
1064 Time try/catch-guard on JSON.stringify:
1065 - log.info: 0.07368ms per iteration
3649708 Trent Mick note issue #2 for this
authored
1066
969ac69 Trent Mick prep for future dev
authored
1067
cb41c7e Trent Mick prepare for 0.5.0 release
authored
1068 ## bunyan 0.5.0
543ef15 Trent Mick 'log.info(err)' support
authored
1069
25b8eea Trent Mick Use 10/20/... instead of 1/2/... for level constant values.
authored
1070 - Use 10/20/... instead of 1/2/... for level constant values. Ostensibly this
1071 allows for intermediary levels from the defined "trace/debug/..." set.
1072 However, that is discouraged. I'd need a strong user argument to add
1073 support for easily using alternative levels. Consider using a separate
1074 JSON field instead.
140c9fd Trent Mick s/service/name/ for Logger name field. "service" is unnecessarily tied t...
authored
1075 - s/service/name/ for Logger name field. "service" is unnecessarily tied
1076 to usage for a service. No need to differ from log4j Logger "name".
352c417 Trent Mick Add `log.level(...)` and `log.levels(...)` API for changing logger strea...
authored
1077 - Add `log.level(...)` and `log.levels(...)` API for changing logger stream
1078 levels.
1079 - Add `TRACE|DEBUG|INFO|WARN|ERROR|FATAL` level constants to exports.
543ef15 Trent Mick 'log.info(err)' support
authored
1080 - Add `log.info(err)` special case for logging an `Error` instance. For
1081 example `log.info(new TypeError("boom")` will produce:
1082
1083 ...
1084 "err": {
1085 "message": "boom",
1086 "name": "TypeError",
1087 "stack": "TypeError: boom\n at Object.<anonymous> ..."
1088 },
1089 "msg": "boom",
1090 ...
141253c Trent Mick prep for future dev
authored
1091
1092
12f2701 Trent Mick prepare for 0.4.0 release
authored
1093 ## bunyan 0.4.0
e934baf Trent Mick v0.4: add 'src' call source location info support (the Yunong release)
authored
1094
1095 - Add `new Logger({src: true})` config option to have a 'src' attribute be
1096 automatically added to log records with the log call source info. Example:
1097
1098 "src": {
1099 "file": "/Users/trentm/tm/node-bunyan/examples/src.js",
1100 "line": 20,
1101 "func": "Wuzzle.woos"
1102 },
d7e499b Trent Mick prep for future dev
authored
1103
1104
7c94825 Trent Mick prepare for 0.3.0 release
authored
1105 ## bunyan 0.3.0
6806112 Trent Mick - `log.clone` -> `log.child` to better reflect the relationship: streams...
authored
1106
40777aa Trent Mick 'log.child(..., true)' support for 10x faster with 'simple' field additi...
authored
1107 - `log.child(options[, simple])` Added `simple` boolean arg. Set `true` to
1108 assert that options only add fields (no config changes). Results in a 10x
887f407 Trent Mick --no-color option
authored
1109 speed increase in child creation. See "tools/timechild.js". On my Mac,
40777aa Trent Mick 'log.child(..., true)' support for 10x faster with 'simple' field additi...
authored
1110 "fast child" creation takes about 0.001ms. IOW, if your app is dishing
1111 10,000 req/s, then creating a log child for each request will take
1112 about 1% of the request time.
6806112 Trent Mick - `log.clone` -> `log.child` to better reflect the relationship: streams...
authored
1113 - `log.clone` -> `log.child` to better reflect the relationship: streams and
1114 serializers are inherited. Streams can't be removed as part of the child
1115 creation. The child doesn't own the parent's streams (so can't close them).
1116 - Clean up Logger creation. The goal here was to ensure `log.child` usage
1117 is fast. TODO: measure that.
1118 - Add `Logger.stdSerializers.err` serializer which is necessary to get good
1119 Error object logging with node 0.6 (where core Error object properties
1120 are non-enumerable).
d123784 Trent Mick prep for future dev
authored
1121
1122
7798f40 Trent Mick prepare for 0.2.0 release
authored
1123 ## bunyan 0.2.0
aecc04f Trent Mick prep for subsequent release
authored
1124
a475a1a Trent Mick 0.2: specing core log record fields (mainly)
authored
1125 - Spec'ing core/recommended log record fields.
1126 - Add `LOG_VERSION` to exports.
1127 - Improvements to request/response serializations.
aecc04f Trent Mick prep for subsequent release
authored
1128
1129
7539c03 Trent Mick prepare for 0.1.0 release
authored
1130 ## bunyan 0.1.0
135163e Trent Mick VERSIONS, cutarelease prep
authored
1131
1132 First release.
Something went wrong with that request. Please try again.