couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r951918 - /couchdb/trunk/src/couchdb/couch_httpd.erl
Date Sun, 06 Jun 2010 18:08:16 GMT
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", []),



Mime
View raw message