Fix ecto dev warning
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
1a6967cb7d
commit
67b63a9a6e
@ -77,9 +77,7 @@ defmodule Mobilizon do
|
|||||||
|
|
||||||
ErrorReporting.configure()
|
ErrorReporting.configure()
|
||||||
|
|
||||||
if @env == :dev do
|
setup_ecto_dev_logger(@env)
|
||||||
Ecto.DevLogger.install(Storage.Repo)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Only attach the telemetry logger when we aren't in an IEx shell
|
# Only attach the telemetry logger when we aren't in an IEx shell
|
||||||
unless Code.ensure_loaded?(IEx) && IEx.started?() do
|
unless Code.ensure_loaded?(IEx) && IEx.started?() do
|
||||||
@ -156,4 +154,10 @@ defmodule Mobilizon do
|
|||||||
restart: :temporary
|
restart: :temporary
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp setup_ecto_dev_logger(:dev) do
|
||||||
|
Ecto.DevLogger.install(Storage.Repo)
|
||||||
|
end
|
||||||
|
|
||||||
|
defp setup_ecto_dev_logger(_), do: nil
|
||||||
end
|
end
|
||||||
|
2
mix.exs
2
mix.exs
@ -223,7 +223,7 @@ defmodule Mobilizon.Mixfile do
|
|||||||
{:sobelow, "~> 0.8", only: [:dev, :test]},
|
{:sobelow, "~> 0.8", only: [:dev, :test]},
|
||||||
{:doctor, "~> 0.20.0", only: :dev},
|
{:doctor, "~> 0.20.0", only: :dev},
|
||||||
{:haversine, "~> 0.1.0"},
|
{:haversine, "~> 0.1.0"},
|
||||||
{:ecto_dev_logger, "~> 0.7", only: :dev}
|
{:ecto_dev_logger, "~> 0.7"}
|
||||||
] ++ oauth_deps()
|
] ++ oauth_deps()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user