FAQ

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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 12 of 22 | next ›
Discussion Overview
groupnodejs @
categoriesnodejs
postedAug 6, '12 at 7:42p
activeAug 7, '12 at 6:40p
posts22
users5
websitenodejs.org
irc#node.js

People

Translate

site design / logo © 2022 Grokbase