Skip to content
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

V1.0.0 fix logger deprecations #80

Merged
merged 1 commit into from
Mar 7, 2024
Merged
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
14 changes: 7 additions & 7 deletions lib/snowflex/client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ defmodule Snowflex.Client 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 All @@ -205,7 +205,7 @@ defmodule Snowflex.Client 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 All @@ -222,7 +222,7 @@ defmodule Snowflex.Client do
case :odbc.commit(pid, commit_mode) do
{:error, reason} ->
error = Error.exception(reason)
Logger.warn("Commit failed: #{error.message}")
Logger.warning("Commit failed: #{error.message}")

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

Expand All @@ -239,7 +239,7 @@ defmodule Snowflex.Client do
case :odbc.select_count(pid, to_charlist(statement)) do
{:error, reason} ->
error = Error.exception(reason)
Logger.warn("Unable to execute select count: #{error.message}")
Logger.warning("Unable to execute select count: #{error.message}")

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

Expand All @@ -256,7 +256,7 @@ defmodule Snowflex.Client do
case :odbc.select(pid, position, num_rows) do
{:error, reason} ->
error = Error.exception(reason)
Logger.warn("Unable to execute next: #{error.message}")
Logger.warning("Unable to execute next: #{error.message}")

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

Expand All @@ -273,7 +273,7 @@ defmodule Snowflex.Client do
case :odbc.next(pid) do
{:error, reason} ->
error = Error.exception(reason)
Logger.warn("Unable to execute next: #{error.message}")
Logger.warning("Unable to execute next: #{error.message}")

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

Expand All @@ -293,7 +293,7 @@ defmodule Snowflex.Client 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