From 426ab48c842cc7f9a4d0a3f11eacd7c63b334287 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Sun, 6 Jun 2010 18:08:15 +0000 Subject: 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 --- src/couchdb/couch_httpd.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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", []), -- cgit v1.2.3