From 7e7069e23fded26f65e074ce5855fdbf5e28ce33 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Thu, 2 May 2024 23:29:18 +0400 Subject: [PATCH] modifs.mineures sans commentaires --- nur_src/cli/Application.php | 15 +++++---------- src/output/log.php | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/nur_src/cli/Application.php b/nur_src/cli/Application.php index 9435aee..539f029 100644 --- a/nur_src/cli/Application.php +++ b/nur_src/cli/Application.php @@ -228,16 +228,11 @@ abstract class Application { static function set_application_log_output(string $logfile): void { msg::get()->setParametrableParams(["log_output" => $logfile]); - if (!nlog::have_log()) { - nlog::set_messenger_class(nStdMessenger::class, [ - "output" => $logfile, - "add_date" => true, - ]); - } else { - nlog::reset_params([ - "output" => $logfile, - ]); - } + nlog::create_or_reset_params([ + "output" => $logfile, + ], nStdMessenger::class, [ + "add_date" => true, + ]); } static function set_application_color(bool $color): void { msg::get()->setParametrableParams(["color" => $color]); diff --git a/src/output/log.php b/src/output/log.php index 9fcb1da..51b261f 100644 --- a/src/output/log.php +++ b/src/output/log.php @@ -1,6 +1,7 @@