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

Upgrade logging to use warning over warn #48

Merged
merged 1 commit into from
Sep 27, 2023
Merged
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
4 changes: 2 additions & 2 deletions lib/heartbeat.ex
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ defmodule OffBroadwayRedisStream.Heartbeat do
:ok

{:error, %RedisClient.ConnectionError{} = error} when retry_count < @max_retries ->
Logger.warn(
Logger.warning(
"Failed to create group, retry_count: #{retry_count}, reason: #{inspect(error.reason)}"
)

Expand All @@ -69,7 +69,7 @@ defmodule OffBroadwayRedisStream.Heartbeat do
Process.send_after(self(), :heartbeat, interval)

{:error, %RedisClient.ConnectionError{} = error} when retry_count < @max_retries ->
Logger.warn(
Logger.warning(
"Failed to send heartbeat, retry_count: #{retry_count}, reason: #{inspect(error.reason)}"
)

Expand Down
10 changes: 5 additions & 5 deletions lib/producer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ defmodule OffBroadwayRedisStream.Producer do
{:noreply, [], %{state | pending_ack: []}}

{:error, error} ->
Logger.warn(
Logger.warning(
"Unable to acknowledge and delete messages with Redis. Reason: #{inspect(error)}"
)

Expand All @@ -175,7 +175,7 @@ defmodule OffBroadwayRedisStream.Producer do
{:noreply, [], %{state | pending_ack: []}}

{:error, error} ->
Logger.warn("Unable to acknowledge messages with Redis. Reason: #{inspect(error)}")
Logger.warning("Unable to acknowledge messages with Redis. Reason: #{inspect(error)}")

if length(ids) > state.max_pending_ack do
{:stop, "Pending ack count is more than maximum limit #{state.max_pending_ack}", state}
Expand All @@ -197,7 +197,7 @@ defmodule OffBroadwayRedisStream.Producer do
:ok

{:error, error} ->
Logger.warn(
Logger.warning(
"Unable to acknowledge and delete messages with Redis. Reason: #{inspect(error)}"
)
end
Expand All @@ -213,7 +213,7 @@ defmodule OffBroadwayRedisStream.Producer do
:ok

{:error, error} ->
Logger.warn("Unable to acknowledge messages with Redis. Reason: #{inspect(error)}")
Logger.warning("Unable to acknowledge messages with Redis. Reason: #{inspect(error)}")
end

Heartbeat.stop(state.heartbeat_pid)
Expand Down Expand Up @@ -463,7 +463,7 @@ defmodule OffBroadwayRedisStream.Producer do

case apply(client, func, args ++ [redis_config]) do
{:error, %RedisClient.ConnectionError{} = error} when retry_count < max_retries ->
Logger.warn(
Logger.warning(
"Failed to run #{func}, retry_count: #{retry_count}, reason: #{inspect(error.reason)}"
)

Expand Down