nickva commented on a change in pull request #3568:
URL: https://github.com/apache/couchdb/pull/3568#discussion_r633803420
##########
File path: src/chttpd/src/chttpd.erl
##########
@@ -132,19 +185,21 @@ start_link(Name, Options) ->
set_auth_handlers(),
- Options1 = Options ++ [
- {loop, fun ?MODULE:handle_request/1},
- {name, Name},
- {ip, IP}
- ],
+ Options1 =
Review comment:
0
##########
File path: src/chttpd/src/chttpd.erl
##########
@@ -132,19 +185,21 @@ start_link(Name, Options) ->
set_auth_handlers(),
- Options1 = Options ++ [
- {loop, fun ?MODULE:handle_request/1},
- {name, Name},
- {ip, IP}
- ],
+ Options1 =
+ Options ++
+ [
+ {loop, fun ?MODULE:handle_request/1},
+ {name, Name},
+ {ip, IP}
+ ],
ServerOpts = get_server_options("chttpd"),
Options2 = merge_server_options(Options1, ServerOpts),
case mochiweb_http:start(Options2) of
- {ok, Pid} ->
- {ok, Pid};
- {error, Reason} ->
- io:format("Failure to start Mochiweb: ~s~n", [Reason]),
- {error, Reason}
+ {ok, Pid} ->
Review comment:
+1
##########
File path: src/chttpd/src/chttpd.erl
##########
@@ -437,32 +525,42 @@ maybe_log(#httpd{} = HttpReq, #httpd_resp{should_log =
true} = HttpResp) ->
% - client port
% - timers: connection, request, time to first byte, ...
% - response size
- %
- ?LOG_NOTICE(#{
- method => Method,
- path => RawUri,
- code => Code,
- user => User,
- % req_size => MochiReq:get(body_length),
- src => #{ip4 => Peer},
- duration => RequestTime
- }, #{domain => [chttpd_access_log]}),
- couch_log:notice("~s ~s ~s ~s ~s ~B ~p ~B", [Host, Peer, User,
- Method, RawUri, Code, Status, RequestTime]);
+ %
+ ?LOG_NOTICE(
+ #{
Review comment:
+2
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]