couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [11/13] git commit: Reduce logging
Date Wed, 13 Feb 2013 13:17:14 GMT
Reduce logging


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

Branch: refs/heads/nodejs_couchdb
Commit: 275727573c766c0277af2e1c1dfa0b1cce11b172
Parents: a6c54a5
Author: Jason Smith (work) <jhs@iriscouch.com>
Authored: Tue Feb 12 17:45:27 2013 +0000
Committer: Jason Smith (work) <jhs@iriscouch.com>
Committed: Tue Feb 12 17:45:27 2013 +0000

----------------------------------------------------------------------
 src/couchdb/couch_httpd_auth.erl   |    2 --
 src/couchdb/couch_httpd_nodejs.erl |   10 +++++-----
 2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/27572757/src/couchdb/couch_httpd_auth.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_httpd_auth.erl b/src/couchdb/couch_httpd_auth.erl
index 1fc06f3..9c9797f 100644
--- a/src/couchdb/couch_httpd_auth.erl
+++ b/src/couchdb/couch_httpd_auth.erl
@@ -104,10 +104,8 @@ nodejs_authentication_handler(Req) ->
     end.
 
 nodejs_authentication_handler(Req, Given) ->
-    io:format("Need to see if this is good: ~p\n", [Given]),
     case couch_os_daemons:check_app_password(Given) of
     true ->
-        io:format("Good password\n"),
         User = <<"_nodejs">>,
         Req#httpd{user_ctx=#user_ctx{name=User, roles=[<<"_admin">>]}};
     _ ->

http://git-wip-us.apache.org/repos/asf/couchdb/blob/27572757/src/couchdb/couch_httpd_nodejs.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_httpd_nodejs.erl b/src/couchdb/couch_httpd_nodejs.erl
index 5e7c7bf..5dfdbec 100644
--- a/src/couchdb/couch_httpd_nodejs.erl
+++ b/src/couchdb/couch_httpd_nodejs.erl
@@ -25,7 +25,7 @@ handle_node_req(#httpd{}=Req) -> ok
         of nil -> ok
             , couch_httpd:send_json(Req, 502, {[ {error,no_app}, {name,AppName} ]})
         ; AppPort -> ok
-            , io:format("Relay to :~p\n", [AppPort])
+            %, io:format("Relay to :~p\n", [AppPort])
             , relay(Req, AppPort)
         end
     .
@@ -33,7 +33,7 @@ handle_node_req(#httpd{}=Req) -> ok
 relay(Req, Port) when is_integer(Port) -> ok
     , case gen_tcp:connect("127.0.0.1", Port, [binary, {packet,0}, {active,false}])
         of {ok, AppSocket} -> ok
-            , io:format("Connected to app on :~w\n", [Port])
+            %, io:format("Connected to app on :~w\n", [Port])
             , relay(Req, AppSocket)
         ; {error, Error} -> ok
             , Resp = {[ {error,nodejs_proxy}, {result, Error} ]}
@@ -45,7 +45,7 @@ relay(#httpd{mochi_req=MochiReq}=Req, AppSocket) -> ok
     , Client = MochiReq:get(socket)
     , ReqBytes = request_to_iolist(Req)
     , Size = iolist_size(ReqBytes)
-    , io:format("Send ~w byte request to app\n", [Size])
+    %, io:format("Send ~w byte request to app\n", [Size])
     , ok = gen_tcp:send(AppSocket, ReqBytes)
     , relay(Client, AppSocket, Size, 0)
     .
@@ -64,11 +64,11 @@ relay(Client, Remote, FromClient, FromRemote) -> ok
             , gen_tcp:send(Client, Data)
             , relay(Client, Remote, FromClient, FromRemote + size(Data))
         ; {tcp_closed, Client} -> ok
-            , io:format("Client disconnected\n")
+            %, io:format("Client disconnected\n")
             , gen_tcp:close(Remote)
             , {ok, ok}
         ; {tcp_closed, Remote} -> ok
-            , io:format("Remote disconnected\n")
+            %, io:format("Remote disconnected\n")
             , gen_tcp:close(Client)
             , {ok, ok}
         ; Else -> ok


Mime
View raw message