aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/test.exs2
-rw-r--r--lib/mix/pleroma.ex6
2 files changed, 6 insertions, 2 deletions
diff --git a/config/test.exs b/config/test.exs
index 07e70dd4d..9b737d4d7 100644
--- a/config/test.exs
+++ b/config/test.exs
@@ -15,7 +15,7 @@ config :pleroma, Pleroma.Captcha,
method: Pleroma.Captcha.Mock
# Print only warnings and errors during test
-config :logger,
+config :logger, :console,
level: :warn,
format: "\n[$level] $message\n"
diff --git a/lib/mix/pleroma.ex b/lib/mix/pleroma.ex
index 94eeb7d68..73a076a53 100644
--- a/lib/mix/pleroma.ex
+++ b/lib/mix/pleroma.ex
@@ -6,7 +6,11 @@ defmodule Mix.Pleroma do
@doc "Common functions to be reused in mix tasks"
def start_pleroma do
Application.put_env(:phoenix, :serve_endpoints, false, persistent: true)
- Application.put_env(:logger, :console, level: :debug)
+
+ if Pleroma.Config.get(:env) != :test do
+ Application.put_env(:logger, :console, level: :debug)
+ end
+
{:ok, _} = Application.ensure_all_started(:pleroma)
end