incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@grabb.it>
Subject logging from views
Date Sat, 24 May 2008 23:31:33 GMT
I've been playing with views, and finding the new Reduce a little confusing.

To get a better idea about what's happening I added a log() function
to the view context, that prints to couchjs stderr (which I redirect
to a log file).

Here's the diff: http://pastie.caboo.se/202877

I don't think CouchDB cares about view server stderr, so it seems
handy to make it available to view functions for debugging. The only
thing I'm not sure of is couchjs.tpl.in - maybe there's a better way
to redirect stderr. Also, I don't know which template variable
corresponds to the log directory, so it's still hardcoded.

I want to polish this and road test it before I add it to JIRA, any
feedback will be appreciated!

Chris

-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message