Some tasks try to set log level in test environment, but we were stripping logs belog :warn.
Ensure console backend logs in test environment are :warn, but mix tasks run in test env do not run with :debug because it's far too verbose.
This commit is contained in:
parent
c65190c799
commit
edaae845af
|
@ -15,7 +15,7 @@
|
||||||
method: Pleroma.Captcha.Mock
|
method: Pleroma.Captcha.Mock
|
||||||
|
|
||||||
# Print only warnings and errors during test
|
# Print only warnings and errors during test
|
||||||
config :logger,
|
config :logger, :console,
|
||||||
level: :warn,
|
level: :warn,
|
||||||
format: "\n[$level] $message\n"
|
format: "\n[$level] $message\n"
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,11 @@ defmodule Mix.Pleroma do
|
||||||
@doc "Common functions to be reused in mix tasks"
|
@doc "Common functions to be reused in mix tasks"
|
||||||
def start_pleroma do
|
def start_pleroma do
|
||||||
Application.put_env(:phoenix, :serve_endpoints, false, persistent: true)
|
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)
|
{:ok, _} = Application.ensure_all_started(:pleroma)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue