commit: 56618873af1aa08f6c271b6cd0f0cbcdfd56bcf1
parent cbdd134174d0e7a769245af9d3dbf3a2779f8da6
Author: feld <feld@feld.me>
Date: Wed, 20 Dec 2023 22:11:35 +0000
Merge branch 'deprecations' into 'develop'
More deprecation fixes/cleanup
See merge request pleroma/pleroma!4012
Diffstat:
11 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/changelog.d/deprecations2.skip b/changelog.d/deprecations2.skip
diff --git a/config/benchmark.exs b/config/benchmark.exs
@@ -14,7 +14,7 @@ config :pleroma, Pleroma.Captcha,
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: []
diff --git a/config/description.exs b/config/description.exs
@@ -1187,7 +1187,7 @@ config :pleroma, :config_description, [
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 @@ config :pleroma, :config_description, [
key: :level,
type: {:dropdown, :atom},
description: "Log level",
- suggestions: [:debug, :info, :warn, :error]
+ suggestions: [:debug, :info, :warning, :error]
},
%{
key: :ident,
@@ -1235,7 +1235,7 @@ config :pleroma, :config_description, [
key: :level,
type: {:dropdown, :atom},
description: "Log level",
- suggestions: [:debug, :info, :warn, :error]
+ suggestions: [:debug, :info, :warning, :error]
},
%{
key: :format,
@@ -1937,7 +1937,7 @@ config :pleroma, :config_description, [
key: :log,
type: {:dropdown, :atom},
description: "Logs verbose mode",
- suggestions: [false, :error, :warn, :info, :debug]
+ suggestions: [false, :error, :warning, :info, :debug]
},
%{
key: :queues,
diff --git a/config/test.exs b/config/test.exs
@@ -16,7 +16,7 @@ config :pleroma, Pleroma.Captcha,
# 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: []
diff --git a/priv/repo/migrations/20180516144508_add_trigram_extension.exs b/priv/repo/migrations/20180516144508_add_trigram_extension.exs
@@ -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"
)
diff --git a/priv/repo/migrations/20190710125158_add_following_address_from_source_data.exs b/priv/repo/migrations/20190710125158_add_following_address_from_source_data.exs
@@ -26,7 +26,7 @@ defmodule Pleroma.Repo.Migrations.AddFollowingAddressFromSourceData 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
diff --git a/priv/repo/migrations/20191118084500_data_migration_populate_user_relationships.exs b/priv/repo/migrations/20191118084500_data_migration_populate_user_relationships.exs
@@ -63,7 +63,7 @@ defmodule Pleroma.Repo.Migrations.DataMigrationPopulateUserRelationships 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
diff --git a/priv/repo/migrations/20200811143147_ap_id_not_null.exs b/priv/repo/migrations/20200811143147_ap_id_not_null.exs
@@ -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"
)
diff --git a/test/mix/tasks/pleroma/ecto/migrate_test.exs b/test/mix/tasks/pleroma/ecto/migrate_test.exs
@@ -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()
diff --git a/test/mix/tasks/pleroma/ecto/rollback_test.exs b/test/mix/tasks/pleroma/ecto/rollback_test.exs
@@ -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"])
diff --git a/test/pleroma/config_db_test.exs b/test/pleroma/config_db_test.exs
@@ -443,13 +443,13 @@ defmodule Pleroma.ConfigDBTest 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,