Skip to content

Commit

Permalink
Replace deprecated Logger.warn with Logger.warning (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nezteb authored Nov 27, 2023
1 parent 3122296 commit 226cec3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/grpc/server/adapters/cowboy/handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ defmodule GRPC.Server.Adapters.Cowboy.Handler do
{:ok, req, state}
catch
:exit, :timeout ->
Logger.warn("Timeout when reading full body")
Logger.warning("Timeout when reading full body")
info({:handling_timeout, self()}, req, state)
end

Expand Down Expand Up @@ -458,7 +458,7 @@ defmodule GRPC.Server.Adapters.Cowboy.Handler do
defp extract_subtype("application/grpc-web-text+" <> rest), do: {:ok, rest}

defp extract_subtype(type) do
Logger.warn("Got unknown content-type #{type}, please create an issue.")
Logger.warning("Got unknown content-type #{type}, please create an issue.")
{:ok, "proto"}
end

Expand Down
2 changes: 1 addition & 1 deletion lib/grpc/server/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ defmodule GRPC.Server.Supervisor do
{endpoint, endpoint.__meta__(:servers)}
rescue
FunctionClauseError ->
Logger.warn(
Logger.warning(
"deprecated: servers as argument of GRPC.Server.Supervisor, please use GRPC.Endpoint"
)

Expand Down
2 changes: 1 addition & 1 deletion lib/grpc/transport/http2.ex
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ defmodule GRPC.Transport.HTTP2 do
end

defp append_encoding(headers, grpc_encoding) when is_binary(grpc_encoding) do
Logger.warn("grpc_encoding option is deprecated, please use compressor.")
Logger.warning("grpc_encoding option is deprecated, please use compressor.")
[{"grpc-encoding", grpc_encoding} | headers]
end

Expand Down
2 changes: 1 addition & 1 deletion test/support/integration_test_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defmodule GRPC.Integration.TestCase do
result

{:error, :eaddrinuse} ->
Logger.warn("Got eaddrinuse when reconnecting to #{server}:#{port}. retry: #{retry}")
Logger.warning("Got eaddrinuse when reconnecting to #{server}:#{port}. retry: #{retry}")

if retry >= 1 do
Process.sleep(500)
Expand Down

0 comments on commit 226cec3

Please sign in to comment.