From 09cb3bb65f013e0f51fd824b11ff2df99e83b542 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Mon, 26 May 2008 11:45:15 +0000 Subject: Improve the debug logging of request details. As the logging was split into multiple log messages, concurrent requests would get mixed up in the log. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@660166 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd.erl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/couchdb') diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index 5ee7f6ab..7174a145 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -50,7 +50,6 @@ stop() -> mochiweb_http:stop(?MODULE). handle_request(Req, DocumentRoot) -> - % alias HEAD to GET as mochiweb takes care of stripping the body Method = case Req:get(method) of 'HEAD' -> 'GET'; @@ -61,10 +60,12 @@ handle_request(Req, DocumentRoot) -> % removed, but URL quoting left intact {Path, _, _} = mochiweb_util:urlsplit_path(Req:get(raw_path)), - ?LOG_DEBUG("Version: ~p", [Req:get(version)]), - ?LOG_DEBUG("Method: ~p", [Method]), - ?LOG_DEBUG("Request URI: ~p", [Path]), - ?LOG_DEBUG("Headers: ~p", [mochiweb_headers:to_list(Req:get(headers))]), + ?LOG_DEBUG("~s ~s ~p~nHeaders: ~p", [ + atom_to_list(Req:get(method)), + Path, + Req:get(version), + mochiweb_headers:to_list(Req:get(headers)) + ]), {ok, Resp} = case catch(handle_request(Req, DocumentRoot, Method, Path)) of {ok, Resp0} -> -- cgit v1.2.3