Skip to content

Commit

Permalink
Merge pull request #80 from pepsico-ecommerce/v1.0.0-fix-logger-depre…
Browse files Browse the repository at this point in the history
…cations

V1.0.0 fix logger deprecations
  • Loading branch information
kellyfelkins authored Mar 7, 2024
2 parents 6504bb4 + 3eeebbb commit b6eb28c
Showing 1 changed file with 7 additions and 7 deletions.
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

0 comments on commit b6eb28c

Please sign in to comment.