couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r957952 - /couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl
Date Fri, 25 Jun 2010 14:09:13 GMT
Author: jan
Date: Fri Jun 25 14:09:13 2010
New Revision: 957952

URL: http://svn.apache.org/viewvc?rev=957952&view=rev
Log:
Merge r951918 from trunk.

keep massive invalid json blobs out of the error logger, move them to debug log

Modified:
    couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl

Modified: couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl?rev=957952&r1=957951&r2=957952&view=diff
==============================================================================
--- couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl (original)
+++ couchdb/branches/0.11.x/src/couchdb/couch_httpd.erl Fri Jun 25 14:09:13 2010
@@ -250,7 +250,8 @@ handle_request_int(MochiReq, DefaultFun,
         throw:{http_head_abort, Resp0} ->
             {ok, Resp0};
         throw:{invalid_json, S} ->
-            ?LOG_ERROR("attempted upload of invalid JSON ~s", [S]),
+            ?LOG_ERROR("attempted upload of invalid JSON (set log_level to debug to log it)",
[]),
+            ?LOG_DEBUG("Invalid JSON: ~p",[S]),
             send_error(HttpReq, {bad_request, "invalid UTF-8 JSON"});
         throw:unacceptable_encoding ->
             ?LOG_ERROR("unsupported encoding method for the response", []),



Mime
View raw message