Skip to content

Fix deprecation warnings for Logger #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/snowflex/db_connection/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ defmodule Snowflex.DBConnection.Server do
case :odbc.sql_query(pid, to_charlist(statement)) do
{:error, reason} ->
error = Error.exception(reason)
Logger.warn("Unable to execute query: #{error.message}")
Logger.warning("Unable to execute query: #{error.message}")

{:reply, {:error, error}, state}

Expand Down Expand Up @@ -133,7 +133,7 @@ defmodule Snowflex.DBConnection.Server do
case :odbc.param_query(pid, to_charlist(statement), params) do
{:error, reason} ->
error = Error.exception(reason)
Logger.warn("Unable to execute query: #{error.message}")
Logger.warning("Unable to execute query: #{error.message}")

{:reply, {:error, error}, state}

Expand Down Expand Up @@ -161,7 +161,7 @@ defmodule Snowflex.DBConnection.Server do
{:noreply, %{pid: pid, backoff: :backoff.succeed(backoff), state: :connected}}

{:error, reason} ->
Logger.warn("Unable to connect to snowflake: #{inspect(reason)}")
Logger.warning("Unable to connect to snowflake: #{inspect(reason)}")

seconds =
backoff
Expand Down
8 changes: 4 additions & 4 deletions lib/snowflex/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ defmodule Snowflex.Worker do
{:noreply, state}

{:error, reason} ->
Logger.warn("Unable to connect to snowflake: #{inspect(reason)}")
Logger.warning("Unable to connect to snowflake: #{inspect(reason)}")

Process.send_after(
self(),
Expand Down Expand Up @@ -122,7 +122,7 @@ defmodule Snowflex.Worker do
defp do_sql_query(%{pid: pid} = state, query) do
case :odbc.sql_query(pid, to_charlist(query)) do
{:error, reason} ->
Logger.warn("Unable to execute query: #{inspect(reason)}")
Logger.warning("Unable to execute query: #{inspect(reason)}")
{{:error, reason}, state}

result ->
Expand All @@ -140,7 +140,7 @@ defmodule Snowflex.Worker do

case :odbc.param_query(pid, ch_query, ch_params) do
{:error, reason} ->
Logger.warn("Unable to execute query: #{inspect(reason)}")
Logger.warning("Unable to execute query: #{inspect(reason)}")
{{:error, reason}, state}

result ->
Expand All @@ -162,7 +162,7 @@ defmodule Snowflex.Worker do
end

defp log_heartbeat_result({{:error, _reason}, state}) do
Logger.warn("heartbeat failed to send")
Logger.warning("heartbeat failed to send")
state
end

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Snowflex.MixProject do
app: :snowflex,
name: "Snowflex",
version: @version,
elixir: "~> 1.9",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
Expand Down