프로젝트

일반

사용자정보

통계
| 개정판:

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

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

1
# higher prio
2

    
3
- `bunyan` (without redir) ^C should stop, doesn't since recent change
4
- man page for the bunyan CLI (refer to it in the readme)
5
    - perhaps wait for a bunyan new version with deps, and use dashdash
6
      with a (vapour) man page generator
7

    
8
# v2
9

    
10
- ^C fix
11
- node-exeunt
12
- `createLogger(<config-and-fields>, <fields>)` changes (#460)
13
    - see section below
14
- the dtrace-provider thing (#487)
15
    TODO: answer Cody email
16
- use package.json version for VERSION
17
- use deps
18
    - dashdash
19
    - assert-plus?
20
    - verror?
21
- break out to multiple files
22
    - want to work through PRs before that, so don't just break them all
23
- TODO: a quick pass through tickets and pulls for other things to include
24
- get ticket refs for the above, if any
25
- formatters: read up again on `glp master..1.x`
26
- support for customer formatters
27
    - for the CLI as well? How? ~/.bunyanrc?
28

    
29

    
30
# changes to ctor and log.child to separate fields from config
31

    
32
<https://github.com/trentm/node-bunyan/issues/460>
33

    
34
Current:
35

    
36
    createLogger(<config-and-fields>)
37
    log.child(<config-and-fields>, <just-fields-bool>)
38

    
39
Could be:
40

    
41
    createLogger(<config-and-fields>, <fields>)
42
    log.child(<config-and-fields>, <fields>)
43
        # Still support: log.child(<config-and-fields>, <just-fields-bool>)
44

    
45
Pros: Compat issues are minimal: a change is only required if there is a
46
collision with used field and a new config var name.
47
Cons: A *slight* con is that my guess is the common usage of child is
48
`log.child(<fields>)`, so the more future-proof common usage becomes:
49

    
50
    log.child(null, <fields>)
51

    
52
That's not too bad. It is clearer at least than:
53

    
54
    log.child(<fields>, true)
55

    
56
TODO:
57

    
58
- is there a ticket for this work already?
59
- make the change
60
- do a migration guide? i.e. provide the grep commands to find all
61
  possible calls to inspect. E.g. if don't have `rg logUndefined` in your
62
  code, then you are fine. And one time future-proofing via changing
63
  to fields in the *second* arg.
64
- list of issues/pulls that wanted to add new config fields
65

    
66

    
67

    
68
# docs
69

    
70
- document log.addStream() and log.addSerializers()
71

    
72

    
73
# someday/maybe
74

    
75
- 2.0 (?) with `v: 1` in log records. Fwd/bwd compat in `bunyan` CLI
76
- `tail -f`-like support
77
- full-on docs
78
- better examples/
79
- better coloring
80
- look at pino (bunyan style, perf benefits)
81
- would be exciting to have bunyan support in http://lnav.org/ if that
82
  made sense
83
- "template" support for 'rotating-file' stream to get dated rolled files
84
- "all" or "off" levels? log4j? logging.py?
85
  logging.py has NOTSET === 0. I think that is only needed/used for
86
  multi-level hierarchical effective level.
87
- buffered writes to increase speed:
88
    - I'd start with a tools/timeoutput.js for some numbers to compare
89
      before/after. Sustained high output to a file.
90
    - perhaps this would be a "buffered: true" option on the stream object
91
    - then wrap the "stream" with a local class that handles the buffering
92
    - to finish this, need the 'log.close' and `process.on('exit', ...)`
93
      work that Trent has started.
94
- "canWrite" handling for full streams. Need to buffer a la log4js
95
- test file log with logadm rotation: does it handle that?
96
- test suite:
97
    - test for a cloned logger double-`stream.end()` causing problems.
98
      Perhaps the "closeOnExit" for existing streams should be false for
99
      clones.
100
    - test that a `log.clone(...)` adding a new field matching a serializer
101
      works *and* that an existing field in the parent is not *re-serialized*.
102
- split out `bunyan` cli to a "bunyan" or "bunyan-reader" or "node-bunyan-reader"
103
  as the basis for tools to consume bunyan logs. It can grow indep of node-bunyan
104
  for generating the logs.
105
  It would take a Bunyan log record object and be expected to emit it.
106

    
107
        node-bunyan-reader
108
            .createReadStream(path, [options]) ?
109

    
110
- coloring bug: in less the indented extra info lines only have the first
111
  line colored. Do we need the ANSI char on *each* line? That'll be
112
  slower.
113
- document "well-known" keys from bunyan CLI p.o.v.. Add "client_req".
114
- More `bunyan` output formats and filtering features.
115
- Think about a bunyan dashboard that supports organizing and viewing logs
116
  from multiple hosts and services.
117
- doc the restify RequestCaptureStream usage of RingBuffer. Great example.
118
- A vim plugin (a la http://vim.cybermirror.org/runtime/autoload/zip.vim ?) to
119
  allow browsing (read-only) a bunyan log in rendered form.
120
- Some speed comparisons with others to get a feel for Bunyan's speed.
121
- what about promoting 'latency' field and making that easier?
122
- `log.close` to close streams and shutdown and `this.closed`
123
  process.on('exit', log.close)
124
  -> 'end' for the name
125
- bunyan cli: more layouts (http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/EnhancedPatternLayout.html)
126
  Custom log formats (in config file? in '-f' arg) using printf or hogan.js
127
  or whatever. Dap wants field width control for lining up. Hogan.js is
128
  probably overkill for this.
129
- loggly example using raw streams, hook.io?, whatever.
130
- serializer support:
131
    - restify-server.js example -> restifyReq ? or have `req` detect that.
132
      That is nicer for the "use all standard ones". *Does* restify req
133
      have anything special?
134
    - differential HTTP *client* req/res with *server* req/res.
135
- statsd stream? http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/
136
  Think about it.
137
- web ui. Ideas: http://googlecloudplatform.blogspot.ca/2014/04/a-new-logs-viewer-for-google-cloud.html