couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject svn commit: r660140 - in /incubator/couchdb/trunk: THANKS share/server/main.js
Date Mon, 26 May 2008 09:24:17 GMT
Author: cmlenz
Date: Mon May 26 02:24:17 2008
New Revision: 660140

URL: http://svn.apache.org/viewvc?rev=660140&view=rev
Log:
Applied patch to enable logging from Javascript view functions. Closes COUCHDB-59. Thanks
to Chris Anderson for the patch.

Modified:
    incubator/couchdb/trunk/THANKS
    incubator/couchdb/trunk/share/server/main.js

Modified: incubator/couchdb/trunk/THANKS
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/THANKS?rev=660140&r1=660139&r2=660140&view=diff
==============================================================================
--- incubator/couchdb/trunk/THANKS (original)
+++ incubator/couchdb/trunk/THANKS Mon May 26 02:24:17 2008
@@ -6,6 +6,7 @@
 CouchDB by reporting problems, suggesting various improvements or submitting
 changes. A list of these people is included below.
 
+ * Chris Anderson <jchris@grabb.it>
  * William Beh <willbeh@gmail.com>
  * Benoit Chesneau <bchesneau@gmail.com>
  * Till Klampaeckel <till@klampaeckel.de>

Modified: incubator/couchdb/trunk/share/server/main.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/server/main.js?rev=660140&r1=660139&r2=660140&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/server/main.js [utf-8] (original)
+++ incubator/couchdb/trunk/share/server/main.js [utf-8] Mon May 26 02:24:17 2008
@@ -28,11 +28,16 @@
   return rv;
 }
 
+log = function(message) {
+  print(toJSON({log: toJSON(message)}));  
+}
+
 try {
   // if possible, use evalcx (not always available)
   sandbox = evalcx('');
   sandbox.emit = emit;
   sandbox.sum = sum;
+  sandbox.log = log;
 } catch (e) {}
 
 // Commands are in the form of json arrays:



Mime
View raw message