From 751712d97022fa99a190cda228a9bcc10b42ede9 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 25 Nov 2020 12:52:39 -0600 Subject: [PATCH] Prevent mix tasks from spewing any internal logging unless DEBUG is in the env e.g., DEBUG=1 mix pleroma.config migrate_from_db --- lib/mix/pleroma.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mix/pleroma.ex b/lib/mix/pleroma.ex index 6df1cf538..cd3f44074 100644 --- a/lib/mix/pleroma.ex +++ b/lib/mix/pleroma.ex @@ -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) -- 2.45.2