couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1035105 - in /couchdb/branches/1.0.x: THANKS share/server/util.js
Date Mon, 15 Nov 2010 00:06:30 GMT
Author: jan
Date: Mon Nov 15 00:06:29 2010
New Revision: 1035105

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

Improve log(<xml/>);

Patch by Benjamin Young.

Closes COUCHDB-895.

Modified:
    couchdb/branches/1.0.x/THANKS
    couchdb/branches/1.0.x/share/server/util.js

Modified: couchdb/branches/1.0.x/THANKS
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/THANKS?rev=1035105&r1=1035104&r2=1035105&view=diff
==============================================================================
--- couchdb/branches/1.0.x/THANKS (original)
+++ couchdb/branches/1.0.x/THANKS Mon Nov 15 00:06:29 2010
@@ -66,5 +66,6 @@ suggesting improvements or submitting ch
  * Lim Yue Chuan <shasderias@gmail.com>
  * David Davis <xantus@xantus.org>
  * Dale Harvey <dale@arandomurl.com>
+ * Benjamin Young <byoung@bigbluehat.com>
 
 For a list of authors see the `AUTHORS` file.

Modified: couchdb/branches/1.0.x/share/server/util.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/server/util.js?rev=1035105&r1=1035104&r2=1035105&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/server/util.js (original)
+++ couchdb/branches/1.0.x/share/server/util.js Mon Nov 15 00:06:29 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