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

Use new logger standard #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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/grpc/adapter/cowboy/handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ defmodule GRPC.Adapter.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 @@ -472,7 +472,7 @@ defmodule GRPC.Adapter.Cowboy.Handler do
defp extract_subtype(<<"application/grpc;", rest::binary>>), 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
6 changes: 4 additions & 2 deletions lib/grpc/server/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,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 All @@ -99,7 +99,9 @@ defmodule GRPC.Server.Supervisor do
ver = to_string(vsn)

unless Version.match?(ver, ">= 2.9.0") do
Logger.warn("cowlib should be >= 2.9.0, it's #{ver} now. See grpc's README for details")
Logger.warning(
"cowlib should be >= 2.9.0, it's #{ver} now. See grpc's README for details"
)
end

_ ->
Expand Down
2 changes: 1 addition & 1 deletion lib/grpc/stub.ex
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ defmodule GRPC.Stub do
end

defp parse_req_opts([{:content_type, content_type} | t], acc) do
Logger.warn(":content_type has been deprecated, please use :codec")
Logger.warning(":content_type has been deprecated, please use :codec")
parse_req_opts(t, Map.put(acc, :content_type, content_type))
end

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 @@ -98,7 +98,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 mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule GRPC.Mixfile do
def project do
[
app: :grpc,
version: "0.6.4",
version: "0.7",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that we're closer to romantic then semantic versioning, but the behaviour didn't change at all, so what about

Suggested change
version: "0.7",
version: "0.6.5",

?

elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
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
Loading