couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1035104 - in /couchdb/trunk: THANKS share/server/util.js
Date Mon, 15 Nov 2010 00:04:48 GMT
Author: jan
Date: Mon Nov 15 00:04:47 2010
New Revision: 1035104

URL: http://svn.apache.org/viewvc?rev=1035104&view=rev
Log:
Avoid lengthy stack traces for log(undefined);

Improve log(<xml/>);

Patch by Benjamin Young.

Closes COUCHDB-895.

Modified:
    couchdb/trunk/THANKS
    couchdb/trunk/share/server/util.js

Modified: couchdb/trunk/THANKS
URL: http://svn.apache.org/viewvc/couchdb/trunk/THANKS?rev=1035104&r1=1035103&r2=1035104&view=diff
==============================================================================
--- couchdb/trunk/THANKS (original)
+++ couchdb/trunk/THANKS Mon Nov 15 00:04:47 2010
@@ -72,5 +72,6 @@ suggesting improvements or submitting ch
  * Dale Harvey <dale@arandomurl.com>
  * Juuso Väänänen <juuso@vaananen.org>
  * Jeff Zellner <jeff.zellner@gmail.com>
+ * Benjamin Young <byoung@bigbluehat.com>
 
 For a list of authors see the `AUTHORS` file.

Modified: couchdb/trunk/share/server/util.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/util.js?rev=1035104&r1=1035103&r2=1035104&view=diff
==============================================================================
--- couchdb/trunk/share/server/util.js (original)
+++ couchdb/trunk/share/server/util.js Mon Nov 15 00:04:47 2010
@@ -117,8 +117,10 @@ function respond(obj) {
 
 function log(message) {
   // idea: query_server_config option for log level
-  if (typeof message != "string") {
+  if (typeof message == "xml") {
+    message = message.toXMLString();
+  } else if (typeof message != "string") {
     message = Couch.toJSON(message);
   }
-  respond(["log", message]);
+  respond(["log", String(message)]);
 };



Mime
View raw message