Your installation / configuration steps suggest making ecto_dev_logger available to all environments, but with a couple of small changes, we can eliminate it from the release bundle:
## Installation
The package can be installed by adding `ecto_dev_logger` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:ecto_dev_logger, "~> 0.10", only: :dev}
]
end
Then disable default logger for your repo in config file for dev mode:
if config_env() == :dev do
config :my_app, MyApp.Repo, log: false
end
And install telemetry handler in MyApp.Application:
if Code.ensure_loaded?(Ecto.DevLogger), do: Ecto.DevLogger.install(MyApp.Repo)
Telemetry handler will be installed only if log configuration value is set to false.
Your installation / configuration steps suggest making
ecto_dev_logger
available to all environments, but with a couple of small changes, we can eliminate it from the release bundle:Then disable default logger for your repo in config file for dev mode:
And install telemetry handler in
MyApp.Application
:Telemetry handler will be installed only if
log
configuration value is set tofalse
.That's it.