From: Christopher Date: Thu, 16 Apr 2020 17:03:30 +0000 (-0500) Subject: remove logging X-Git-Url: http://git.entropealabs.com/?a=commitdiff_plain;h=b2f21c572ea9a6f482f984a0cb1bb4bc7b3d78a7;p=wampex_router.git remove logging --- diff --git a/lib/router/realms/session.ex b/lib/router/realms/session.ex index f82dde3..0d2e830 100644 --- a/lib/router/realms/session.ex +++ b/lib/router/realms/session.ex @@ -17,16 +17,12 @@ defmodule Wampex.Router.Realms.Session do end def callees(db, realm, procedure) do - Logger.info("Getting callees for #{inspect(procedure)} in realm #{inspect(realm)}") - case ClusterKV.get(db, realm, procedure, 500) do :not_found -> :not_found {_key, callees} -> - Logger.info("Got Callees: #{inspect(callees)}") callee_index = get_index(db, realm, procedure) - Logger.info("Got Index: #{callee_index}") {callees, callee_index} end end @@ -37,7 +33,6 @@ defmodule Wampex.Router.Realms.Session do callee_index {_key, [_ | t]} -> - Logger.info("Got list of indexes... #{inspect(t)}") get_last_index(t) end end @@ -99,8 +94,6 @@ defmodule Wampex.Router.Realms.Session do end defp update_round_robin({id, v}, value) do - Logger.info("Update Round Robin: #{inspect(id)} -> #{inspect(v)}: #{inspect(value)}") - val = case v do [values] -> values @@ -109,11 +102,9 @@ defmodule Wampex.Router.Realms.Session do case val + 1 do ni when ni < value -> - Logger.info("Incrementing round robin: #{inspect(id)} to #{inspect(ni)}") {id, [ni]} _ -> - Logger.info("Restarting round robin") {id, [0]} end end diff --git a/lib/router/session.ex b/lib/router/session.ex index 6776fad..2b2e806 100644 --- a/lib/router/session.ex +++ b/lib/router/session.ex @@ -752,15 +752,12 @@ defmodule Wampex.Router.Session do defp get_live_callee(proxy, callees, index, tries) when is_list(callees) do {_id, {pid, node}} = c = Enum.at(callees, index) - Logger.info("Seeing if live callee #{inspect(pid)} on node #{inspect(node)} is up...") case GenServer.call({proxy, node}, {:is_up, pid}) do true -> c false -> - Logger.error("#{inspect(pid)} on #{inspect(node)} is not live, trying next") - index = case index + 1 do ni when ni < length(callees) -> ni diff --git a/mix.exs b/mix.exs index 4537471..4360cc1 100644 --- a/mix.exs +++ b/mix.exs @@ -39,7 +39,7 @@ defmodule Wampex.Router.MixProject do defp deps do [ {:cluster_kv, - git: "https://gitlab.com/entropealabs/cluster_kv.git", tag: "afff49680c84dabdd9a5713238da70854f518beb"}, + git: "https://gitlab.com/entropealabs/cluster_kv.git", tag: "d3bb958de67ef22304f24641661261a1c2df684d"}, {:cors_plug, "~> 2.0"}, {:credo, "~> 1.2", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 0.5.1", only: [:dev, :test], runtime: false}, diff --git a/mix.lock b/mix.lock index 84cdfe2..904a656 100644 --- a/mix.lock +++ b/mix.lock @@ -1,7 +1,7 @@ %{ "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, "certifi": {:hex, :certifi, "2.5.1", "867ce347f7c7d78563450a18a6a28a8090331e77fa02380b4a21962a65d36ee5", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "805abd97539caf89ec6d4732c91e62ba9da0cda51ac462380bbd28ee697a8c42"}, - "cluster_kv": {:git, "https://gitlab.com/entropealabs/cluster_kv.git", "afff49680c84dabdd9a5713238da70854f518beb", [tag: "afff49680c84dabdd9a5713238da70854f518beb"]}, + "cluster_kv": {:git, "https://gitlab.com/entropealabs/cluster_kv.git", "d3bb958de67ef22304f24641661261a1c2df684d", [tag: "d3bb958de67ef22304f24641661261a1c2df684d"]}, "conv_case": {:hex, :conv_case, "0.2.2", "5a98b74ab8f7ddbad670e5c7bb39ff280e60699aa3b25c7062ceccf48137433c", [:mix], [], "hexpm", "561c550ab6d55b2a4d4c14449e58c9957798613eb26ea182e14a962965377bca"}, "cors_plug": {:hex, :cors_plug, "2.0.2", "2b46083af45e4bc79632bd951550509395935d3e7973275b2b743bd63cc942ce", [:mix], [{:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "f0d0e13f71c51fd4ef8b2c7e051388e4dfb267522a83a22392c856de7e46465f"}, "cowboy": {:hex, :cowboy, "2.7.0", "91ed100138a764355f43316b1d23d7ff6bdb0de4ea618cb5d8677c93a7a2f115", [:rebar3], [{:cowlib, "~> 2.8.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "04fd8c6a39edc6aaa9c26123009200fc61f92a3a94f3178c527b70b767c6e605"},