From ff9133b978edb637081882e7efd49e2f538e9e15 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 19 Nov 2019 16:01:17 -0600 Subject: [PATCH] Allow mix tasks to always run with debug logging --- config/config.exs | 1 + config/prod.exs | 2 +- config/test.exs | 2 +- lib/mix/pleroma.ex | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/config.exs b/config/config.exs index bf2b3f6e2..9ac78c589 100644 --- a/config/config.exs +++ b/config/config.exs @@ -180,6 +180,7 @@ config :pleroma, Pleroma.Web.Endpoint, # Configures Elixir's Logger config :logger, :console, + level: :debug, format: "$time $metadata[$level] $message\n", metadata: [:request_id] diff --git a/config/prod.exs b/config/prod.exs index 9c205cbd2..301d2b9cb 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -20,7 +20,7 @@ config :pleroma, Pleroma.Web.Endpoint, config :phoenix, serve_endpoints: true # Do not print debug messages in production -config :logger, level: :warn +config :logger, :console, level: :warn # ## SSL Support # diff --git a/config/test.exs b/config/test.exs index da2778aa7..559ff423e 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, level: :warn +config :logger, :console, level: :warn config :pleroma, :auth, oauth_consumer_strategies: [] diff --git a/lib/mix/pleroma.ex b/lib/mix/pleroma.ex index faeb30e1d..94eeb7d68 100644 --- a/lib/mix/pleroma.ex +++ b/lib/mix/pleroma.ex @@ -6,6 +6,7 @@ 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) {:ok, _} = Application.ensure_all_started(:pleroma) end -- 2.45.2