On Tue, Jul 10, 2012 at 6:17 PM, Elad Ben-Israel
<elad.benisr...@gmail.com>wrote:

> Not sure exactly what use case Gaurav is interested in, but I was
> interested in this thread because I think there is an unmet need around
> logging which domain-attached context could help solve (even a single
> pointer to a global instance). Logs are emitted everywhere across
> application (and library) stack and in node, mostly via `console.xxx`. One
> useful feature would be to allow, for example, correlating all console logs
> emitted during the processing of an incoming request. A few logging
> libraries do allow pushing context but they all require passing along some
> state throughout the async hoops, which means modifying the way logging is
> done throughout the entire stack.
>

Well yes, you can't use console.log(), but "Don't Do That" anyway, it's bad
practice. Look at how Haraka does logging - every log line gets a UUID
associated with the current connection/transaction. It has made tracing
issues with mail at Craigslist an absolute dream.

Matt.

Reply via email to