1 | # v2
|
2 |
|
3 | - `createLogger(<config-and-fields>, <fields>)` changes (#460)
|
4 | - see section below
|
5 | - the dtrace-provider thing (#487)
|
6 | TODO: answer Cody email
|
7 | - use package.json version for VERSION
|
8 | - use deps
|
9 | - dashdash
|
10 | - assert-plus?
|
11 | - verror?
|
12 | - break out to multiple files
|
13 | - want to work through PRs before that, so don't just break them all
|
14 | - TODO: a quick pass through tickets and pulls for other things to include
|
15 | - get ticket refs for the above, if any
|
16 | - formatters: read up again on `glp master..1.x`
|
17 | - support for customer formatters
|
18 | - for the CLI as well? How? ~/.bunyanrc?
|
19 | - if doing ~/.bunyanrc, then consider color schemes
|
20 |
|
21 |
|
22 |
|
23 | # changes to ctor and log.child to separate fields from config
|
24 |
|
25 | <https://github.com/trentm/node-bunyan/issues/460>
|
26 |
|
27 | Current:
|
28 |
|
29 | createLogger(<config-and-fields>)
|
30 | log.child(<config-and-fields>, <just-fields-bool>)
|
31 |
|
32 | Could be:
|
33 |
|
34 | createLogger(<config-and-fields>, <fields>)
|
35 | log.child(<config-and-fields>, <fields>)
|
36 | # Still support: log.child(<config-and-fields>, <just-fields-bool>)
|
37 |
|
38 | Pros: Compat issues are minimal: a change is only required if there is a
|
39 | collision with used field and a new config var name.
|
40 | Cons: A *slight* con is that my guess is the common usage of child is
|
41 | `log.child(<fields>)`, so the more future-proof common usage becomes:
|
42 |
|
43 | log.child(null, <fields>)
|
44 |
|
45 | That's not too bad. It is clearer at least than:
|
46 |
|
47 | log.child(<fields>, true)
|
48 |
|
49 | TODO:
|
50 |
|
51 | - is there a ticket for this work already? #460
|
52 | - make the change
|
53 | - do a migration guide? i.e. provide the grep commands to find all
|
54 | possible calls to inspect. E.g. if don't have `rg logUndefined` in your
|
55 | code, then you are fine. And one time future-proofing via changing
|
56 | to fields in the *second* arg.
|
57 | - list of issues/pulls that wanted to add new config fields
|
58 |
|
59 |
|
60 | # higher prio
|
61 |
|
62 | - published organized advice for
|
63 | https://github.com/trentm/node-bunyan/issues/37 so can close that out.
|
64 | Perhaps a wiki page with examples and strategies.
|
65 | - man page for the bunyan CLI (refer to it in the readme)
|
66 | - perhaps wait for a bunyan new version with deps, and use dashdash
|
67 | with a (vapour) man page generator
|
68 |
|
69 |
|
70 | # docs
|
71 |
|
72 | - document log.addStream() and log.addSerializers()
|
73 |
|
74 |
|
75 | # someday/maybe
|
76 |
|
77 | - 2.0 (?) with `v: 1` in log records. Fwd/bwd compat in `bunyan` CLI
|
78 | - `tail -f`-like support
|
79 | - full-on docs
|
80 | - better examples/
|
81 | - better coloring
|
82 | - look at pino (bunyan style, perf benefits)
|
83 | - would be exciting to have bunyan support in http://lnav.org/ if that
|
84 | made sense
|
85 | - "template" support for 'rotating-file' stream to get dated rolled files
|
86 | - "all" or "off" levels? log4j? logging.py?
|
87 | logging.py has NOTSET === 0. I think that is only needed/used for
|
88 | multi-level hierarchical effective level.
|
89 | - buffered writes to increase speed:
|
90 | - I'd start with a tools/timeoutput.js for some numbers to compare
|
91 | before/after. Sustained high output to a file.
|
92 | - perhaps this would be a "buffered: true" option on the stream object
|
93 | - then wrap the "stream" with a local class that handles the buffering
|
94 | - to finish this, need the 'log.close' and `process.on('exit', ...)`
|
95 | work that Trent has started.
|
96 | - "canWrite" handling for full streams. Need to buffer a la log4js
|
97 | - test file log with logadm rotation: does it handle that?
|
98 | - test suite:
|
99 | - test for a cloned logger double-`stream.end()` causing problems.
|
100 | Perhaps the "closeOnExit" for existing streams should be false for
|
101 | clones.
|
102 | - test that a `log.clone(...)` adding a new field matching a serializer
|
103 | works *and* that an existing field in the parent is not *re-serialized*.
|
104 | - split out `bunyan` cli to a "bunyan" or "bunyan-reader" or "node-bunyan-reader"
|
105 | as the basis for tools to consume bunyan logs. It can grow indep of node-bunyan
|
106 | for generating the logs.
|
107 | It would take a Bunyan log record object and be expected to emit it.
|
108 |
|
109 | node-bunyan-reader
|
110 | .createReadStream(path, [options]) ?
|
111 |
|
112 | - coloring bug: in less the indented extra info lines only have the first
|
113 | line colored. Do we need the ANSI char on *each* line? That'll be
|
114 | slower.
|
115 | - document "well-known" keys from bunyan CLI p.o.v.. Add "client_req".
|
116 | - More `bunyan` output formats and filtering features.
|
117 | - Think about a bunyan dashboard that supports organizing and viewing logs
|
118 | from multiple hosts and services.
|
119 | - doc the restify RequestCaptureStream usage of RingBuffer. Great example.
|
120 | - A vim plugin (a la http://vim.cybermirror.org/runtime/autoload/zip.vim ?) to
|
121 | allow browsing (read-only) a bunyan log in rendered form.
|
122 | - Some speed comparisons with others to get a feel for Bunyan's speed.
|
123 | - what about promoting 'latency' field and making that easier?
|
124 | - `log.close` to close streams and shutdown and `this.closed`
|
125 | process.on('exit', log.close)
|
126 | -> 'end' for the name
|
127 | - bunyan cli: more layouts (http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/EnhancedPatternLayout.html)
|
128 | Custom log formats (in config file? in '-f' arg) using printf or hogan.js
|
129 | or whatever. Dap wants field width control for lining up. Hogan.js is
|
130 | probably overkill for this.
|
131 | - loggly example using raw streams, hook.io?, whatever.
|
132 | - serializer support:
|
133 | - restify-server.js example -> restifyReq ? or have `req` detect that.
|
134 | That is nicer for the "use all standard ones". *Does* restify req
|
135 | have anything special?
|
136 | - differential HTTP *client* req/res with *server* req/res.
|
137 | - statsd stream? http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/
|
138 | Think about it.
|
139 | - web ui. Ideas: http://googlecloudplatform.blogspot.ca/2014/04/a-new-logs-viewer-for-google-cloud.html
|