Author: cmlenz Date: Mon May 26 04:45:15 2008 New Revision: 660166 URL: http://svn.apache.org/viewvc?rev=660166&view=rev Log: 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. Modified: incubator/couchdb/trunk/src/couchdb/couch_httpd.erl Modified: incubator/couchdb/trunk/src/couchdb/couch_httpd.erl URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=660166&r1=660165&r2=660166&view=diff ============================================================================== --- incubator/couchdb/trunk/src/couchdb/couch_httpd.erl (original) +++ incubator/couchdb/trunk/src/couchdb/couch_httpd.erl Mon May 26 04:45:15 2008 @@ -50,7 +50,6 @@ 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 @@ % 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} ->