add warning about log.info(myobj) as both Yunong and Orlando have hit this (at least)

This commit is contained in:
Trent Mick 2012-06-18 12:08:48 -07:00
parent 7e90e07865
commit cb6e84921e
2 changed files with 14 additions and 1 deletions

View file

@ -64,6 +64,14 @@ The full `log.{trace|debug|...|fatal}(...)` API is:
log.info(err, 'more on this: %s', more); log.info(err, 'more on this: %s', more);
// ... or you can specify the "msg". // ... or you can specify the "msg".
Note that this implies **you cannot pass any object as the first argument
to log it**. IOW, `log.info(myobject)` isn't going to work the way you
expect. Adding support for this API would necessitate (a) JSON-ifying safely
that given object (sometimes hard, and probably slow) and (b) putting all its
attribs under a top-level 'x' field name or something to avoid field name
collisions.
## bunyan tool ## bunyan tool
A `bunyan` tool is provided **for pretty-printing bunyan logs** and, eventually, A `bunyan` tool is provided **for pretty-printing bunyan logs** and, eventually,

View file

@ -1,4 +1,4 @@
- [Yuonong] buffered writes to increase speed: - [Yunong] buffered writes to increase speed:
- I'd start with a tools/timeoutput.js for some numbers to compare - I'd start with a tools/timeoutput.js for some numbers to compare
before/after. Sustained high output to a file. before/after. Sustained high output to a file.
- perhaps this would be a "buffered: true" option on the stream object - perhaps this would be a "buffered: true" option on the stream object
@ -20,9 +20,14 @@
as the basis for tools to consume bunyan logs. It can grow indep of node-bunyan as the basis for tools to consume bunyan logs. It can grow indep of node-bunyan
for generating the logs. for generating the logs.
It would take a Bunyan log record object and be expected to emit it. It would take a Bunyan log record object and be expected to emit it.
node-bunyan-reader
.createReadStream(path, [options]) ?
- document "well-known" keys from bunyan CLI p.o.v.. Add "client_req". - document "well-known" keys from bunyan CLI p.o.v.. Add "client_req".
- bunyan tool: built in less usage (a la git?) so that I don't have to - bunyan tool: built in less usage (a la git?) so that I don't have to
go through this: `bunyan --color master.log | less -R` go through this: `bunyan --color master.log | less -R`
- want `bunyan -f foo.log` a la `tail -f`