summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Smith (work) <jhs@iriscouch.com>2013-02-12 17:45:27 +0000
committerJason Smith (work) <jhs@iriscouch.com>2013-02-12 17:45:27 +0000
commit275727573c766c0277af2e1c1dfa0b1cce11b172 (patch)
tree6e61e8da9bb825afd0dbdc0b8ad02684482acb5a
parenta6c54a55049895851139f7fcc58e6078d054ff6e (diff)
downloadcouchdb-275727573c766c0277af2e1c1dfa0b1cce11b172.tar.gz
Reduce logging
-rw-r--r--src/couchdb/couch_httpd_auth.erl2
-rw-r--r--src/couchdb/couch_httpd_nodejs.erl10
2 files changed, 5 insertions, 7 deletions
diff --git a/src/couchdb/couch_httpd_auth.erl b/src/couchdb/couch_httpd_auth.erl
index 1fc06f32b..9c9797fb7 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">>]}};
_ ->
diff --git a/src/couchdb/couch_httpd_nodejs.erl b/src/couchdb/couch_httpd_nodejs.erl
index 5e7c7bf38..5dfdbece0 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