From 9418fb079a02f1f7a693714d6d46f521ab25cd19 Mon Sep 17 00:00:00 2001 From: Nelson Vides Date: Sat, 21 Sep 2024 13:11:12 +0200 Subject: [PATCH] Migrate error_logger to logger It has been a very long time since OTP made `logger` available and deprecated `error_logger`, so it's about time we migrate to it. Note too that we're choosing to report structured logging, that is, maps, as `worker_pool` is a library, it should allow application code to choose how to filter and format log messages. --- src/wpool.erl | 6 +++--- src/wpool_pool.erl | 14 +++++++++---- src/wpool_process_callbacks.erl | 7 ++++++- src/wpool_process_sup.erl | 8 ++++++-- src/wpool_sup.erl | 7 ++++++- src/wpool_utils.erl | 2 +- src/wpool_worker.erl | 35 ++++++++++++++++++++++----------- test/wpool_SUITE.erl | 2 +- 8 files changed, 57 insertions(+), 24 deletions(-) diff --git a/src/wpool.erl b/src/wpool.erl index e3bac4e..7803a76 100644 --- a/src/wpool.erl +++ b/src/wpool.erl @@ -89,7 +89,7 @@ -type overrun_handler() :: {Module :: module(), Fun :: atom()}. %% The module and function to call when a task is overrun %% -%% The default value for this setting is `{error_logger, warning_report}'. The function must be of +%% The default value for this setting is `{logger, warning}'. The function must be of %% arity 1, and it will be called as`Module:Fun(Args)' where `Args' is a proplist with the following %% reported values: %%