Skip to content

Commit

Permalink
Prefer :warning over :warn for log level
Browse files Browse the repository at this point in the history
:warn is deprecated and :warning should be used instead (see Elixir.Logger.warn deprecation warnings)
  • Loading branch information
IceDragon200 authored and navinpeiris committed Jun 7, 2023
1 parent 88adf38 commit 8fd24ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/logster/plugs/logger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ defmodule Logster.Plugs.Logger do
defp log_level(%{private: %{logster_log_level: log_level}}, _opts), do: log_level
defp log_level(_, log: log_level), do: log_level
defp log_level(%{status: status}, _opts) when status >= 500, do: :error
defp log_level(%{status: status}, _opts) when status >= 400, do: :warn
defp log_level(%{status: status}, _opts) when status >= 400, do: :warning
defp log_level(_, _opts), do: :info
end

0 comments on commit 8fd24ed

Please sign in to comment.