On Tue, Aug 7, 2012 at 11:28 AM, Tim Caswell <[email protected]> wrote:

> On Tue, Aug 7, 2012 at 9:54 AM, Matt <[email protected]> wrote:
> > I prefer if you at least have a level of indirection away from
> console.log,
> > 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
> expected.
>

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.

Matt.

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to