diff options
author | Jan Lehnardt <jan@apache.org> | 2010-11-15 00:06:29 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2010-11-15 00:06:29 +0000 |
commit | 4b3568a58d37aa48c4a2027a21a34b38782aeec7 (patch) | |
tree | c5295de0fbee1c466ea238773908def22cf6022d /share | |
parent | 678648f2c176149ae9cced1c53f6d3b5760595fa (diff) |
Avoid lengthy stack traces for log(undefined);
Improve log(<xml/>);
Patch by Benjamin Young.
Closes COUCHDB-895.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@1035105 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-rw-r--r-- | share/server/util.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/share/server/util.js b/share/server/util.js index 77b934ed..a5dfa127 100644 --- a/share/server/util.js +++ b/share/server/util.js @@ -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)]); }; |