Skip to content

Commit

Permalink
fix: adjust logger level (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdgonzalez872 authored Mar 17, 2023
1 parent 556eca6 commit fe059dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/avalanche/requests/statement_request.ex
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ defmodule Avalanche.StatementRequest do
|> Keyword.fetch(:retry)
|> case do
:error ->
req_options ++ [retry: &custom_retry/1, retry_delay: &custom_retry_delay/1, max_retries: 5]
req_options ++
[retry: &custom_retry/1, retry_delay: &custom_retry_delay/1, max_retries: 5, retry_log_level: :info]

_exists ->
req_options
Expand Down
2 changes: 2 additions & 0 deletions test/avalanche_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ defmodule AvalancheTest do
assert {:error, %Avalanche.Error{reason: :too_many_requests}} = Avalanche.run("select 1;", [], [], options)
end)

# logger level
assert logs =~ "[info]"
assert logs =~ "will retry"
assert logs =~ "4 attempts left"
assert logs =~ "will retry in 4000ms, 1 attempt left"
Expand Down

0 comments on commit fe059dd

Please sign in to comment.