Update Copyrights
[akkoma] / lib / mix / pleroma.ex
index 548c8a0a45158151bd074d37fb58a5c200c2ea2b..90f8c80081dfe1380c3c792db3acd89706151436 100644 (file)
@@ -1,14 +1,23 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 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)
+
+    if Pleroma.Config.get(:env) != :test do
+      Application.put_env(:logger, :console, level: :debug)
+    end
+
     {:ok, _} = Application.ensure_all_started(:pleroma)
   end
 
+  def load_pleroma do
+    Application.load(:pleroma)
+  end
+
   def get_option(options, opt, prompt, defval \\ nil, defname \\ nil) do
     Keyword.get(options, opt) || shell_prompt(prompt, defval, defname)
   end