CouchDB – Debug CouchDB Views

In order to debug couchDB view functions you can use the log – function:


function(keys, values, rereduce) {
var max = 0;
for( i in values ) {
log( "\n\n" + values[i] + "\n\n");
if (values[i] > max) {
max = values[i];
}
}

return max;
}

You’ll find the output in your couchdb-Log file.

Kommentarfunktion ist deaktiviert