diff options
author | John Christopher Anderson <jchris@apache.org> | 2010-06-06 18:08:15 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2010-06-06 18:08:15 +0000 |
commit | 426ab48c842cc7f9a4d0a3f11eacd7c63b334287 (patch) | |
tree | d5d17d8fe120bc79dfddcda7f22cad802db79aac | |
parent | 1294f5df57c956b93232aa1635f6574c055825f8 (diff) |
keep massive invalid json blobs out of the error logger, move them to debug log
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@951918 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/couchdb/couch_httpd.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index 7f6232e9..a8f0bb58 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -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", []), |