From 5af75abfd685776e61072cb1b221bb6eda488234 Mon Sep 17 00:00:00 2001 From: Stas Date: Fri, 4 Aug 2023 12:06:27 +0200 Subject: [PATCH] chore: change some log level info to debug (#146) --- VERSION | 2 +- lib/supavisor/client_handler.ex | 8 ++++---- lib/supavisor/db_handler.ex | 2 +- lib/supavisor/manager.ex | 2 +- lib/supavisor_web/ws_proxy.ex | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index 521eb3d6..ac166155 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.23 +0.2.24 diff --git a/lib/supavisor/client_handler.ex b/lib/supavisor/client_handler.ex index cf1a24e1..60e72c71 100644 --- a/lib/supavisor/client_handler.ex +++ b/lib/supavisor/client_handler.ex @@ -142,7 +142,7 @@ defmodule Supavisor.ClientHandler do end def handle_event(:internal, {:handle, {method, secrets}}, _, %{sock: sock} = data) do - Logger.info("Handle exchange, auth method: #{inspect(method)}") + Logger.debug("Handle exchange, auth method: #{inspect(method)}") case handle_exchange(sock, {method, secrets}, data.ssl) do {:error, reason} -> @@ -162,7 +162,7 @@ defmodule Supavisor.ClientHandler do nil end - Logger.info("Exchange success") + Logger.debug("Exchange success") :ok = sock_send(sock, Server.authentication_ok()) {:keep_state, %{data | auth_secrets: {method, secrets}}, @@ -171,7 +171,7 @@ defmodule Supavisor.ClientHandler do end def handle_event(:internal, :subscribe, _, %{tenant: tenant, user_alias: db_alias} = data) do - Logger.info("Subscribe to tenant #{inspect({tenant, db_alias})}") + Logger.debug("Subscribe to tenant #{inspect({tenant, db_alias})}") conn_user = if data.proxy_type == :auth_query do @@ -240,7 +240,7 @@ defmodule Supavisor.ClientHandler do def handle_event(_, {proto, _, bin}, :busy, data) when proto in [:tcp, :ssl] do case Db.call(data.db_pid, bin) do :ok -> - Logger.info("DB call success") + Logger.debug("DB call success") :keep_state_and_data {:buffering, size} -> diff --git a/lib/supavisor/db_handler.ex b/lib/supavisor/db_handler.ex index c7d7ad8c..09bbcbf3 100644 --- a/lib/supavisor/db_handler.ex +++ b/lib/supavisor/db_handler.ex @@ -56,7 +56,7 @@ defmodule Supavisor.DbHandler do @impl true def handle_event(:internal, _, :connect, %{auth: auth} = data) do - Logger.info("Try to connect to DB") + Logger.debug("Try to connect to DB") sock_opts = [ :binary, diff --git a/lib/supavisor/manager.ex b/lib/supavisor/manager.ex index 2107841b..01899e72 100644 --- a/lib/supavisor/manager.ex +++ b/lib/supavisor/manager.ex @@ -54,7 +54,7 @@ defmodule Supavisor.Manager do @impl true def handle_call({:subscribe, pid}, _, %{tenant: tenant, user_alias: user_alias} = state) do - Logger.info("Subscribing #{inspect(pid)} to tenant #{inspect({tenant, user_alias})}") + Logger.debug("Subscribing #{inspect(pid)} to tenant #{inspect({tenant, user_alias})}") # don't limit if max_clients is null {reply, new_state} = diff --git a/lib/supavisor_web/ws_proxy.ex b/lib/supavisor_web/ws_proxy.ex index f4958dbc..afe29b8b 100644 --- a/lib/supavisor_web/ws_proxy.ex +++ b/lib/supavisor_web/ws_proxy.ex @@ -9,7 +9,7 @@ defmodule SupavisorWeb.WsProxy do @behaviour Plug def call(conn, state) do - Logger.info("WsProxy is: #{inspect(self())}") + Logger.debug("WsProxy is: #{inspect(self())}") Plug.Conn.upgrade_adapter(conn, :websocket, {__MODULE__, state, %{compress: false}}) end