Repository: couchdb-chttpd Updated Branches: refs/heads/master 5e3bf1f5e -> ccaa4429c
Update logging for new couch_log The nonce is now included in all log messages when its set. The order of host and client are also swapped to make more sense. Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/ccaa4429 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/ccaa4429 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/ccaa4429 Branch: refs/heads/master Commit: ccaa4429c9b42fc5fbea6fbbe41a2e411333514b Parents: 5e3bf1f Author: Paul J. Davis <[email protected]> Authored: Fri Jul 22 05:14:56 2016 -0500 Committer: Paul J. Davis <[email protected]> Committed: Fri Jul 22 05:14:56 2016 -0500 ---------------------------------------------------------------------- src/chttpd.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/ccaa4429/src/chttpd.erl ---------------------------------------------------------------------- diff --git a/src/chttpd.erl b/src/chttpd.erl index a6a4671..58d80d6 100644 --- a/src/chttpd.erl +++ b/src/chttpd.erl @@ -375,7 +375,7 @@ maybe_log(#httpd{} = HttpReq, #httpd_resp{should_log = true} = HttpResp) -> Host = MochiReq:get_header_value("Host"), RawUri = MochiReq:get(raw_path), RequestTime = timer:now_diff(EndTime, BeginTime) / 1000, - couch_log:notice("~s ~s ~s ~s ~s ~s ~B ~p ~B", [Nonce, Peer, Host, User, + couch_log:notice("~s ~s ~s ~s ~s ~B ~p ~B", [Host, Peer, User, Method, RawUri, Code, Status, round(RequestTime)]); maybe_log(_HttpReq, #httpd_resp{should_log = false}) -> ok. @@ -1153,18 +1153,18 @@ check_url_encoding_fail_test_() -> log_format_test() -> ?assertEqual( - "nonce 127.0.0.1 127.0.0.1:15984 undefined " + "127.0.0.1:15984 127.0.0.1 undefined " "GET /_cluster_setup 201 ok 10000", test_log_request("/_cluster_setup", undefined)), ?assertEqual( - "nonce 127.0.0.1 127.0.0.1:15984 user_foo " + "127.0.0.1:15984 127.0.0.1 user_foo " "GET /_all_dbs 201 ok 10000", test_log_request("/_all_dbs", #user_ctx{name = <<"user_foo">>})), %% Utf8Name = unicode:characters_to_binary(Something), Utf8User = <<227,130,136,227,129,134,227,129,147,227,129,157>>, ?assertEqual( - "nonce 127.0.0.1 127.0.0.1:15984 %E3%82%88%E3%81%86%E3%81%93%E3%81%9D " + "127.0.0.1:15984 127.0.0.1 %E3%82%88%E3%81%86%E3%81%93%E3%81%9D " "GET /_all_dbs 201 ok 10000", test_log_request("/_all_dbs", #user_ctx{name = Utf8User})), ok.
