From cd3abe0b4c4cc02b69713f1882c58e82b1631710 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 28 Nov 2023 19:10:28 +0000 Subject: [PATCH 1/5] Fix more Logger warn -> warning --- config/benchmark.exs | 2 +- config/description.exs | 6 +++--- config/test.exs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/benchmark.exs b/config/benchmark.exs index 870ead150..e3e1118ed 100644 --- 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 index 27e7f7e9b..626d826f4 100644 --- a/config/description.exs +++ b/config/description.exs @@ -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 index cf407ebf2..8a42b863a 100644 --- 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: [] From 2207fafa9164ed34c634d042dbf403a6b85d181f Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 28 Nov 2023 19:34:07 +0000 Subject: [PATCH 2/5] Fix more Logger warn -> warning --- test/mix/tasks/pleroma/ecto/migrate_test.exs | 2 +- test/mix/tasks/pleroma/ecto/rollback_test.exs | 2 +- test/pleroma/config_db_test.exs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/mix/tasks/pleroma/ecto/migrate_test.exs b/test/mix/tasks/pleroma/ecto/migrate_test.exs index 912471f60..936e5382a 100644 --- 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 index 9d1a02ae2..db8641e7f 100644 --- 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 index 8eb0ab4cf..97adb9e51 100644 --- 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, From fb3eb6e0a4a930b688dbe6603e35de5e28d0d48f Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 28 Nov 2023 20:00:20 +0000 Subject: [PATCH 3/5] Fix more Logger warn -> warning --- .../migrations/20180516144508_add_trigram_extension.exs | 6 +++--- ...0190710125158_add_following_address_from_source_data.exs | 2 +- ...118084500_data_migration_populate_user_relationships.exs | 2 +- priv/repo/migrations/20200811143147_ap_id_not_null.exs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/priv/repo/migrations/20180516144508_add_trigram_extension.exs b/priv/repo/migrations/20180516144508_add_trigram_extension.exs index b14104cc4..21ead8758 100644 --- 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 index 44a3d6d2d..3a1bf677b 100644 --- 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 index 571a75160..6fa671a79 100644 --- 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 index a160daef4..dbc226663 100644 --- 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" ) From 1fc53c30773173989f63e779cec196d6d06cab3b Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Tue, 18 Jul 2023 22:28:45 +0200 Subject: [PATCH 4/5] config/description.exs: Remove quack Was already removed in f40ccce7e9ad2e9f917fddd798138866c83e514a --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/description.exs b/config/description.exs index 626d826f4..c1d1aeacc 100644 --- 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}] } ] }, From d9fe41a301c7d05c4b5757f24b5aa6f3950c7ff1 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 20 Dec 2023 16:25:58 -0500 Subject: [PATCH 5/5] More deprecation fixes --- changelog.d/deprecations2.skip | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 changelog.d/deprecations2.skip diff --git a/changelog.d/deprecations2.skip b/changelog.d/deprecations2.skip new file mode 100644 index 000000000..e69de29bb