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
