Merge branch 'deprecations' into 'develop'

More deprecation fixes/cleanup

See merge request pleroma/pleroma!4012
This commit is contained in:
feld 2023-12-20 22:11:35 +00:00
commit 56618873af
11 changed files with 16 additions and 16 deletions

View File

View File

@ -14,7 +14,7 @@
method: Pleroma.Captcha.Mock
# Print only warnings and errors during test
config :logger, level: :warn
config :logger, level: :warning
config :pleroma, :auth, oauth_consumer_strategies: []

View File

@ -1187,7 +1187,7 @@
type: [:atom, :tuple, :module],
description:
"Where logs will be sent, :console - send logs to stdout, { ExSyslogger, :ex_syslogger } - to syslog, Quack.Logger - to Slack.",
suggestions: [:console, {ExSyslogger, :ex_syslogger}, Quack.Logger]
suggestions: [:console, {ExSyslogger, :ex_syslogger}]
}
]
},
@ -1202,7 +1202,7 @@
key: :level,
type: {:dropdown, :atom},
description: "Log level",
suggestions: [:debug, :info, :warn, :error]
suggestions: [:debug, :info, :warning, :error]
},
%{
key: :ident,
@ -1235,7 +1235,7 @@
key: :level,
type: {:dropdown, :atom},
description: "Log level",
suggestions: [:debug, :info, :warn, :error]
suggestions: [:debug, :info, :warning, :error]
},
%{
key: :format,
@ -1937,7 +1937,7 @@
key: :log,
type: {:dropdown, :atom},
description: "Logs verbose mode",
suggestions: [false, :error, :warn, :info, :debug]
suggestions: [false, :error, :warning, :info, :debug]
},
%{
key: :queues,

View File

@ -16,7 +16,7 @@
# Print only warnings and errors during test
config :logger, :console,
level: :warn,
level: :warning,
format: "\n[$level] $message\n"
config :pleroma, :auth, oauth_consumer_strategies: []

View File

@ -7,13 +7,13 @@ defmodule Pleroma.Repo.Migrations.AddTrigramExtension do
require Logger
def up do
Logger.warn("ATTENTION ATTENTION ATTENTION\n")
Logger.warning("ATTENTION ATTENTION ATTENTION\n")
Logger.warn(
Logger.warning(
"This will try to create the pg_trgm extension on your database. If your database user does NOT have the necessary rights, you will have to do it manually and re-run the migrations.\nYou can probably do this by running the following:\n"
)
Logger.warn(
Logger.warning(
"sudo -u postgres psql pleroma_dev -c \"create extension if not exists pg_trgm\"\n"
)

View File

@ -26,7 +26,7 @@ def change do
|> Pleroma.Repo.update()
user ->
Logger.warn("User #{user.id} / #{user.nickname} does not seem to have source_data")
Logger.warning("User #{user.id} / #{user.nickname} does not seem to have source_data")
end)
end
end

View File

@ -63,7 +63,7 @@ defp migrate(field, relationship_type_code) do
ON CONFLICT (source_id, relationship_type, target_id) DO NOTHING
""")
else
_ -> Logger.warn("Unresolved #{field} reference: (#{source_uuid}, #{target_id})")
_ -> Logger.warning("Unresolved #{field} reference: (#{source_uuid}, #{target_id})")
end
end
end

View File

@ -8,7 +8,7 @@ defmodule Pleroma.Repo.Migrations.ApIdNotNull do
require Logger
def up do
Logger.warn(
Logger.warning(
"If this migration fails please open an issue at https://git.pleroma.social/pleroma/pleroma/-/issues/new \n"
)

View File

@ -9,7 +9,7 @@ defmodule Mix.Tasks.Pleroma.Ecto.MigrateTest do
test "ecto.migrate info message" do
level = Logger.level()
Logger.configure(level: :warn)
Logger.configure(level: :warning)
assert capture_log(fn ->
Mix.Tasks.Pleroma.Ecto.Migrate.run()

View File

@ -9,7 +9,7 @@ defmodule Mix.Tasks.Pleroma.Ecto.RollbackTest do
test "ecto.rollback info message" do
level = Logger.level()
Logger.configure(level: :warn)
Logger.configure(level: :warning)
assert capture_log(fn ->
Mix.Tasks.Pleroma.Ecto.Rollback.run(["--env", "test"])

View File

@ -443,13 +443,13 @@ test "complex keyword with nested mixed childs" do
test "common keyword" do
assert ConfigDB.to_elixir_types([
%{"tuple" => [":level", ":warn"]},
%{"tuple" => [":level", ":warning"]},
%{"tuple" => [":meta", [":all"]]},
%{"tuple" => [":path", ""]},
%{"tuple" => [":val", nil]},
%{"tuple" => [":webhook_url", "https://hooks.slack.com/services/YOUR-KEY-HERE"]}
]) == [
level: :warn,
level: :warning,
meta: [:all],
path: "",
val: nil,