From c9deb0f47c2013524baa9b56a4af5d3fbfbdc68c Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 6 Feb 2025 22:48:48 +0100 Subject: [PATCH] can add special handlers --- src/Apps/OxidLoggerTrait.php | 6 ++++-- src/LoggerTrait.php | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Apps/OxidLoggerTrait.php b/src/Apps/OxidLoggerTrait.php index 50b4cf6..94b6b25 100644 --- a/src/Apps/OxidLoggerTrait.php +++ b/src/Apps/OxidLoggerTrait.php @@ -43,7 +43,8 @@ trait OxidLoggerTrait string $loggerName, string $filePath, int $logLevel = Logger::INFO, - ?int $maxFiles = null + ?int $maxFiles = null, + array $specialHandlers = [] ): void { if (isset($this->loggers['oxid'])) { @@ -54,7 +55,8 @@ trait OxidLoggerTrait $loggerName, $filePath, $logLevel, - $maxFiles + $maxFiles, + $specialHandlers ); } diff --git a/src/LoggerTrait.php b/src/LoggerTrait.php index dc2de7b..42d68ea 100644 --- a/src/LoggerTrait.php +++ b/src/LoggerTrait.php @@ -46,11 +46,12 @@ trait LoggerTrait string $loggerName, string $filePath, int $logLevel = Logger::INFO, - ?int $maxFiles = null + ?int $maxFiles = null, + array $specialHandlers = [] // see LoggerFactory constants ): void { $this->loggers[$loggerName] = $this->getLoggerFactory() - ->getFileLogger($loggerName, $filePath, $logLevel, $maxFiles); + ->getFileLogger($loggerName, $filePath, $logLevel, $maxFiles, $specialHandlers); } /**