can add special handlers

This commit is contained in:
Daniel Seifert 2025-02-06 22:48:48 +01:00
bovenliggende f46ab842e5
commit c9deb0f47c
Getekend door: DanielS
GPG sleutel-ID: 6A513E13AEE66170
2 gewijzigde bestanden met toevoegingen van 7 en 4 verwijderingen

Bestand weergeven

@ -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
);
}

Bestand weergeven

@ -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);
}
/**