diff options
author | Christopher Lenz <cmlenz@apache.org> | 2008-05-26 11:45:15 +0000 |
---|---|---|
committer | Christopher Lenz <cmlenz@apache.org> | 2008-05-26 11:45:15 +0000 |
commit | 09cb3bb65f013e0f51fd824b11ff2df99e83b542 (patch) | |
tree | d69e313194def105187cd13413548c0d3c352ba1 | |
parent | 5dabbda37198d859db7168744ed208b79f3996fc (diff) |
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
-rw-r--r-- | src/couchdb/couch_httpd.erl | 11 |
1 files changed, 6 insertions, 5 deletions
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} -> |