Skip to content

Commit

Permalink
chore: change some log level info to debug (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
abc3 authored Aug 4, 2023
1 parent 2f36696 commit 5af75ab
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.23
0.2.24
8 changes: 4 additions & 4 deletions lib/supavisor/client_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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} ->
Expand All @@ -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}},
Expand All @@ -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
Expand Down Expand Up @@ -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} ->
Expand Down
2 changes: 1 addition & 1 deletion lib/supavisor/db_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/supavisor/manager.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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} =
Expand Down
2 changes: 1 addition & 1 deletion lib/supavisor_web/ws_proxy.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5af75ab

Please sign in to comment.