couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject [3/7] chttpd commit: updated refs/heads/1993-bigcouch-couch-mrview to 93c771d
Date Fri, 28 Mar 2014 18:45:53 GMT
Change API to function per level


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/faaf44e9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/faaf44e9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/faaf44e9

Branch: refs/heads/1993-bigcouch-couch-mrview
Commit: faaf44e987580b884961a910f862462f22f0d98d
Parents: 927a8d1
Author: Robert Newson <rnewson@apache.org>
Authored: Wed Feb 12 23:22:44 2014 +0000
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Feb 12 23:22:44 2014 +0000

----------------------------------------------------------------------
 src/chttpd.erl         | 10 +++++-----
 src/chttpd_db.erl      |  4 ++--
 src/chttpd_rewrite.erl |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/faaf44e9/src/chttpd.erl
----------------------------------------------------------------------
diff --git a/src/chttpd.erl b/src/chttpd.erl
index 2ff7189..7504db4 100644
--- a/src/chttpd.erl
+++ b/src/chttpd.erl
@@ -168,7 +168,7 @@ handle_request(MochiReq) ->
     MethodOverride = MochiReq:get_primary_header_value("X-HTTP-Method-Override"),
     Method2 = case lists:member(MethodOverride, ["GET", "HEAD", "POST", "PUT", "DELETE",
"TRACE", "CONNECT", "COPY"]) of
     true ->
-        couch_log:log(notice, "MethodOverride: ~s (real method was ~s)", [MethodOverride,
Method1]),
+        couch_log:notice("MethodOverride: ~s (real method was ~s)", [MethodOverride, Method1]),
         case Method1 of
         'POST' -> couch_util:to_existing_atom(MethodOverride);
         _ ->
@@ -218,7 +218,7 @@ handle_request(MochiReq) ->
         throw:{invalid_json, _} ->
             send_error(HttpReq, {bad_request, "invalid UTF-8 JSON"});
         exit:{mochiweb_recv_error, E} ->
-            couch_log:log(notice, LogForClosedSocket ++ " - ~p", [E]),
+            couch_log:notice(LogForClosedSocket ++ " - ~p", [E]),
             exit(normal);
         throw:Error ->
             send_error(HttpReq, Error);
@@ -234,7 +234,7 @@ handle_request(MochiReq) ->
                     exit(normal); % Client disconnect (R14)
                 _Else ->
                     JsonStack = json_stack({Error, nil, Stack}),
-                    couch_log:log(error, "req_err ~p:~p ~p", [Tag, Error, JsonStack]),
+                    couch_log:error("req_err ~p:~p ~p", [Tag, Error, JsonStack]),
                     send_error(HttpReq, {Error, nil, Stack})
             end
     end,
@@ -249,7 +249,7 @@ handle_request(MochiReq) ->
         {aborted, Resp:get(code)}
     end,
     Host = MochiReq:get_header_value("Host"),
-    couch_log:log(notice, "~s ~s ~s ~s ~B ~p ~B", [Peer, Host,
+    couch_log:notice("~s ~s ~s ~s ~B ~p ~B", [Peer, Host,
         atom_to_list(Method1), RawUri, Code, Status, round(RequestTime)]),
     couch_stats_collector:record({couchdb, request_time}, RequestTime),
     case Result of
@@ -258,7 +258,7 @@ handle_request(MochiReq) ->
         {ok, Resp};
     {aborted, _, Reason} ->
         couch_stats_collector:increment({httpd, aborted_requests}),
-        couch_log:log(error, "Response abnormally terminated: ~p", [Reason]),
+        couch_log:error("Response abnormally terminated: ~p", [Reason]),
         exit(normal)
     end.
 

http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/faaf44e9/src/chttpd_db.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index eb1a1c0..0f2c5e3 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -234,7 +234,7 @@ db_req(#httpd{method='POST', path_parts=[DbName], user_ctx=Ctx}=Req, Db)
->
                 {ok, _} -> ok;
                 {accepted, _} -> ok;
                 Error ->
-                    couch_log:log(debug, "Batch doc error (~s): ~p",[DocId, Error])
+                    couch_log:debug("Batch doc error (~s): ~p",[DocId, Error])
                 end
             end),
 
@@ -646,7 +646,7 @@ db_doc_req(#httpd{method='PUT', user_ctx=Ctx}=Req, Db, DocId) ->
                     {ok, _} -> ok;
                     {accepted, _} -> ok;
                     Error ->
-                        couch_log:log(notice, "Batch doc error (~s): ~p",[DocId, Error])
+                        couch_log:notice("Batch doc error (~s): ~p",[DocId, Error])
                     end
                 end),
             send_json(Req, 202, [], {[

http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/faaf44e9/src/chttpd_rewrite.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_rewrite.erl b/src/chttpd_rewrite.erl
index c8df271..2a0cf64 100644
--- a/src/chttpd_rewrite.erl
+++ b/src/chttpd_rewrite.erl
@@ -165,7 +165,7 @@ handle_rewrite_req(#httpd{
             % normalize final path (fix levels "." and "..")
             RawPath1 = ?b2l(iolist_to_binary(normalize_path(RawPath))),
 
-            couch_log:log(debug, "rewrite to ~p ~n", [RawPath1]),
+            couch_log:debug("rewrite to ~p ~n", [RawPath1]),
 
             % build a new mochiweb request
             MochiReq1 = mochiweb_request:new(MochiReq:get(socket),
@@ -415,7 +415,7 @@ path_to_list([<<"..">>|R], Acc, DotDotCount) when DotDotCount
== 2 ->
     "false" ->
         path_to_list(R, [<<"..">>|Acc], DotDotCount+1);
     _Else ->
-        couch_log:log(notice, "insecure_rewrite_rule ~p blocked", [lists:reverse(Acc) ++
[<<"..">>] ++ R]),
+        couch_log:notice("insecure_rewrite_rule ~p blocked", [lists:reverse(Acc) ++ [<<"..">>]
++ R]),
         throw({insecure_rewrite_rule, "too many ../.. segments"})
     end;
 path_to_list([<<"..">>|R], Acc, DotDotCount) ->


Mime
View raw message