-
Notifications
You must be signed in to change notification settings - Fork 157
[debug] hot swappable logging for verbose mode #35
Comments
Sounds like a winner to me
|
I guess you mean something like https://github.com/indexzero/winston? |
I think so too, I'de be very interested in this feature. Adding @pgte and @indexzero for possible input. @perezd do you have some code doing this? Please keep nano in a single file On Sat, Nov 5, 2011 at 4:59 PM, tarantoga <
|
I usually provide a .verbose() function that accepts a function that will accept one string arg, so you can do stuff like .verbose(console.log). |
I've not added any code yet, wanted to start a discussion on the API, first. Definitely will keep it to one file, I estimate less than 15 lines of code :P |
I'm still pulling for a cradle rewrite, but I'd be happy to help where I can. A small request: comma-first makes me die a little inside |
as a former cradle user, I far prefer this API, personally. Not sure how they are related? |
Just a question of using my constrained resources on two couchdb libraries |
I'm happy to work on this project, I feel like its a pretty simplistic change, and something I personally need. |
@perezd go for it :) looking forward to the commits. right now im checking all my public libs work on node 0.6.0 so might see some action on nano soon. @indexzero comma first was just to help developers make less mistakes. Personally I always @perezd maybe a sample with winston integration would be a nice goal :) also we should be trying for 1.0 but I'm waiting on a stand alone ajax implementation to be available since I want |
the most basic implementation that I'd like to give is piping to STDOUT/console.log, from there, anyone should be able to take it and run with it. Its on my short list of things to do! |
Update, we actually need this to solve #36 cause tap hijacks stdout |
excellent timing :) I'm not available to work on this particular issue right this moment (closing in on a milestone for day job), but my idea was to simply add a function call to every location that we're using |
@perezd check travis, im super excited about having this work and knowing if something is broken. this is SUPER COOL |
its pretty rad! awesome find! |
I've started working on this in the browser branch. Was something that just needed to be done. Feedback is welcome, bonus point for showing me I'm an idiot and there's a better way to do it |
More discussion here: |
Verbose mode can be incredibly useful for debugging even in production, instead of just throwing console.log all over the place, we could allow the caller to specify their own custom function for capturing the logs, if a user provides a transport, always pipe to it, otherwise if you're in testing mode, just have that function be console.log
Thoughts?
The text was updated successfully, but these errors were encountered: