Prevent mix tasks from spewing any internal logging unless DEBUG is in the env

e.g., DEBUG=1 mix pleroma.config migrate_from_db
This commit is contained in:
Mark Felder 2020-11-25 12:52:39 -06:00
parent 7a8be68241
commit 751712d970

View File

@ -22,8 +22,8 @@ defmodule Mix.Pleroma do
Pleroma.Application.limiters_setup()
Application.put_env(:phoenix, :serve_endpoints, false, persistent: true)
if Pleroma.Config.get(:env) != :test do
Application.put_env(:logger, :console, level: :debug)
unless System.get_env("DEBUG") do
Logger.remove_backend(:console)
end
adapter = Application.get_env(:tesla, :adapter)