Comments (17)
Sounds like a winner to me
On Nov 4, 2011 11:49 PM, "Derek Perez" <
[email protected]>
wrote:
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.logThoughts?
Reply to this email directly or view it on GitHub:
#35
from nano.
I guess you mean something like https://github.com/indexzero/winston?
from nano.
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
as eventually I will migrate translate the library into the client side too.
On Sat, Nov 5, 2011 at 4:59 PM, tarantoga <
[email protected]>wrote:
I guess you mean something like https://github.com/indexzero/winston?
Reply to this email directly or view it on GitHub:
#35 (comment)
from nano.
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).
Also, I think you should provide this at the db level, not higher.
from nano.
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
from nano.
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
from nano.
as a former cradle user, I far prefer this API, personally. Not sure how they are related?
from nano.
Just a question of using my constrained resources on two couchdb libraries
from nano.
I'm happy to work on this project, I feel like its a pretty simplistic change, and something I personally need.
from nano.
@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 jshint
the code anyway.
@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 nano
in the browser to be independent from jQuery. Thoughts? Yogurt? (I'm having yogurt)
from nano.
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!
from nano.
Update, we actually need this to solve #36 cause tap hijacks stdout
from nano.
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 console.log
currently, and have that execute a function that is passed into the options hash of the nano constructor, if it exists, else, assign console.log
to that option, if nothing is provided, and the NANO_ENV == "testing". If we're not in testing mode, and no capture function is specified, it can be piped to an empty function.
from nano.
@perezd check travis, im super excited about having this work and knowing if something is broken. this is SUPER COOL
from nano.
its pretty rad! awesome find!
from nano.
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
from nano.
More discussion here:
https://gist.github.com/d9eb8b0046fe7e29f526
from nano.
Related Issues (20)
- Does nano support purge? HOT 2
- db.attachment.get file- 'could not be opened because it is empty'
- Can not get correct userctx HOT 2
- Couch DB 2 compatibilty HOT 3
- bulk() with _deleted:true causes error HOT 3
- db.multipart.get does not work with Cloudant Local 1.0.0.5 HOT 1
- Enable permanent replication by writing to "_replicator" database instead of "_replicate" database. HOT 3
- Support temp view
- Doubt on db access of live app HOT 2
- What is the keys in view function based on? Is it the key you emit in the views/map function? HOT 1
- How do you update _rev to update a document?
- uploaded files displaying base64 data in the browser (attachments not viewable)
- Problem with OR -clauses? HOT 1
- Error: badarg every few hours
- Error: {error,emfile} HOT 1
- Example Lazy Creation of View
- Query string encoded when using array of keys
- Database permissions
- db.fetch array of id error
- Attempting to return simple list of documents, small issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nano.