Yeah that's exactly what I'm trying to avoid too Matt. I hate it when libs
indiscriminately fill up my logs with no easy way to control the
verbosity/formatting of their messages.

Is there anything like SLF4J for node? That way you could simply set the
logging implementation at the module level and be done with it.
On Tuesday, August 7, 2012 10:04:06 AM UTC-7, Matt Sergeant wrote:
On Tue, Aug 7, 2012 at 11:28 AM, Tim Caswell wrote:
On Tue, Aug 7, 2012 at 9:54 AM, Matt wrote:
I prefer if you at least have a level of indirection away from
so that I can override it (or pass in a "log" function to a constructor of
some sort) without having to stomp on console.log.
The thing is, what is the purpose of console.log? It is a "log"
function after all. If I want to write data to stdout, I use
process.stdout.write(). If I want to log something to the console, I
use console.log. In vfs-child where I use stdout as a data channel, I
redirect console.log to stderr and all code continues working as
OP asked what was preferred and I gave my opinion. Not everyone is going
to use console.log in exactly the desired way. I'm just stating what I'd
prefer to see.

Plus this way if I don't want to see messages from library X but I do from
library Y I can do so without having to carefully grep.

Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
For more options, visit this group at

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 13 of 22 | next ›
Discussion Overview
groupnodejs @
postedAug 6, '12 at 7:42p
activeAug 7, '12 at 6:40p



site design / logo © 2022 Grokbase