Skip to content

Commit

Permalink
Fix Logger warnings xerions#289
Browse files Browse the repository at this point in the history
  • Loading branch information
maysam authored Oct 8, 2024
1 parent 405ee0f commit e64f856
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/mix/tasks/swagger.generate.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ defmodule Mix.Tasks.Phx.Swagger.Generate do
|> Keyword.get(:swagger_files, %{})

if Enum.empty?(swagger_files) && !Mix.Task.recursing?() do
Logger.warn("""
Logger.warning("""
No swagger configuration found. Ensure phoenix_swagger is configured, eg:
config #{inspect(app_name())}, :phoenix_swagger,
Expand All @@ -57,7 +57,7 @@ defmodule Mix.Tasks.Phx.Swagger.Generate do

case result do
:ok -> :ok
{:error, reason} -> Logger.warn("Failed to generate #{output_file}: #{reason}")
{:error, reason} -> Logger.warning("Failed to generate #{output_file}: #{reason}")
end
end)
end
Expand All @@ -75,7 +75,7 @@ defmodule Mix.Tasks.Phx.Swagger.Generate do

_ ->
File.write!(output_file, contents)
IO.puts("#{app_name()}: generated #{output_file}")
Logger.info("#{app_name()}: generated #{output_file}")
end
end

Expand Down Expand Up @@ -169,7 +169,7 @@ defmodule Mix.Tasks.Phx.Swagger.Generate do
}

_ ->
Logger.warn("Warning: #{controller} module didn't load.")
Logger.warning("Warning: #{controller} module didn't load.")
nil
end
end
Expand Down

0 comments on commit e64f856

Please sign in to comment.