can add special handlers
This commit is contained in:
parent
f46ab842e5
commit
c9deb0f47c
@ -43,7 +43,8 @@ trait OxidLoggerTrait
|
|||||||
string $loggerName,
|
string $loggerName,
|
||||||
string $filePath,
|
string $filePath,
|
||||||
int $logLevel = Logger::INFO,
|
int $logLevel = Logger::INFO,
|
||||||
?int $maxFiles = null
|
?int $maxFiles = null,
|
||||||
|
array $specialHandlers = []
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
if (isset($this->loggers['oxid'])) {
|
if (isset($this->loggers['oxid'])) {
|
||||||
@ -54,7 +55,8 @@ trait OxidLoggerTrait
|
|||||||
$loggerName,
|
$loggerName,
|
||||||
$filePath,
|
$filePath,
|
||||||
$logLevel,
|
$logLevel,
|
||||||
$maxFiles
|
$maxFiles,
|
||||||
|
$specialHandlers
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,11 +46,12 @@ trait LoggerTrait
|
|||||||
string $loggerName,
|
string $loggerName,
|
||||||
string $filePath,
|
string $filePath,
|
||||||
int $logLevel = Logger::INFO,
|
int $logLevel = Logger::INFO,
|
||||||
?int $maxFiles = null
|
?int $maxFiles = null,
|
||||||
|
array $specialHandlers = [] // see LoggerFactory constants
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$this->loggers[$loggerName] = $this->getLoggerFactory()
|
$this->loggers[$loggerName] = $this->getLoggerFactory()
|
||||||
->getFileLogger($loggerName, $filePath, $logLevel, $maxFiles);
|
->getFileLogger($loggerName, $filePath, $logLevel, $maxFiles, $specialHandlers);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user