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

chore: Replace Logger.warn/1 with Logger.warning/2 #523

Closed
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
12 changes: 6 additions & 6 deletions lib/honeybadger/client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ defmodule Honeybadger.Client do
if pid = Process.whereis(__MODULE__) do
GenServer.cast(pid, {:notice, notice})
else
Logger.warn(fn ->
Logger.warning(fn ->
"[Honeybadger] Unable to notify, the :honeybadger client isn't running"
end)
end
Expand Down Expand Up @@ -139,10 +139,10 @@ defmodule Honeybadger.Client do
post_notice(url, headers, payload, hackney_opts)

{:error, %Jason.EncodeError{message: message}} ->
Logger.warn(fn -> "[Honeybadger] Notice encoding failed: #{message}" end)
Logger.warning(fn -> "[Honeybadger] Notice encoding failed: #{message}" end)

{:error, %Protocol.UndefinedError{description: message}} ->
Logger.warn(fn -> "[Honeybadger] Notice encoding failed: #{message}" end)
Logger.warning(fn -> "[Honeybadger] Notice encoding failed: #{message}" end)
end

{:noreply, state}
Expand All @@ -169,14 +169,14 @@ defmodule Honeybadger.Client do

{:ok, code, _headers, ref} when code == 429 ->
body = body_from_ref(ref)
Logger.warn(fn -> "[Honeybadger] API failure: #{inspect(body)}" end)
Logger.warning(fn -> "[Honeybadger] API failure: #{inspect(body)}" end)

{:ok, code, _headers, ref} when code in 400..599 ->
body = body_from_ref(ref)
Logger.warn(fn -> "[Honeybadger] API failure: #{inspect(body)}" end)
Logger.warning(fn -> "[Honeybadger] API failure: #{inspect(body)}" end)

{:error, reason} ->
Logger.warn(fn -> "[Honeybadger] connection error: #{inspect(reason)}" end)
Logger.warning(fn -> "[Honeybadger] connection error: #{inspect(reason)}" end)
end
end

Expand Down