Ensure we can't crash out on unusual logger backend settings

This commit is contained in:
FloatingGhost 2023-08-06 15:12:57 +01:00
parent 59af68c600
commit 368b22fd2f
4 changed files with 5 additions and 6 deletions

View file

@ -158,8 +158,9 @@ defmodule Pleroma.Application do
|> String.to_existing_atom() |> String.to_existing_atom()
|> Code.ensure_loaded!() |> Code.ensure_loaded!()
end) end)
# Use this when 1.15 is standard # Use this when 1.15 is standard
#|> Code.ensure_all_loaded!() # |> Code.ensure_all_loaded!()
end end
defp cachex_children do defp cachex_children do

View file

@ -110,7 +110,7 @@ defmodule Pleroma.Config.TransferTask do
defp configure({_, :backends, _, merged}) do defp configure({_, :backends, _, merged}) do
# removing current backends # removing current backends
Enum.each(Application.get_env(:logger, :backends), &Logger.remove_backend/1) Enum.each(Application.get_env(:logger, :backends, []), &Logger.remove_backend/1)
Enum.each(merged, &Logger.add_backend/1) Enum.each(merged, &Logger.add_backend/1)

View file

@ -34,9 +34,7 @@ defmodule Pleroma.Web.Plugs.OAuthScopesPlug do
permissions = Enum.join(missing_scopes, " #{op} ") permissions = Enum.join(missing_scopes, " #{op} ")
error_message = error_message =
dgettext("errors", "Insufficient permissions: %{permissions}.", dgettext("errors", "Insufficient permissions: %{permissions}.", permissions: permissions)
permissions: permissions
)
conn conn
|> put_resp_content_type("application/json") |> put_resp_content_type("application/json")

View file

@ -4,7 +4,7 @@ defmodule Pleroma.Mixfile do
def project do def project do
[ [
app: :pleroma, app: :pleroma,
version: version("3.10.2"), version: version("3.10.3"),
elixir: "~> 1.14", elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()), elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix] ++ Mix.compilers(), compilers: [:phoenix] ++ Mix.compilers(),