You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by jc...@apache.org on 2010/06/06 20:08:16 UTC

svn commit: r951918 - /couchdb/trunk/src/couchdb/couch_httpd.erl

Author: jchris
Date: Sun Jun  6 18:08:15 2010
New Revision: 951918

URL: http://svn.apache.org/viewvc?rev=951918&view=rev
Log:
keep massive invalid json blobs out of the error logger, move them to debug log

Modified:
    couchdb/trunk/src/couchdb/couch_httpd.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=951918&r1=951917&r2=951918&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd.erl Sun Jun  6 18:08:15 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", []),