Merged in bugfix/PMCORE-1288 (pull request #7308)

PMCORE-1288

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Andrea Adamczyk
2020-04-09 19:44:12 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 41 additions and 2 deletions

View File

@@ -241,6 +241,7 @@ class MonologProvider
*/
public function setStream($fileLog)
{
// ONLY initialize a new RotatingFileHandler if the fileLog is DIFFERENT.
//Set Routating Handler
$this->streamRoutating = new RotatingFileHandler($this->getPathFile() . $fileLog,
$this->getMaxFiles(),
@@ -446,7 +447,6 @@ class MonologProvider
{
if (self::$instance === null) {
self::$instance = new MonologProvider($channel, $fileLog, $readLoggingLevel);
} else {
self::$instance->setConfig($channel, $fileLog, $readLoggingLevel);
}
return self::$instance;
@@ -489,4 +489,12 @@ class MonologProvider
return false;
}
}
/**
* Set the instance property
*/
static function setInstance($instance)
{
self::$instance = $instance;
}
}