PMCORE-1288

This commit is contained in:
Taylor Dondich
2020-04-02 08:29:05 -07:00
committed by Andrea Adamczyk
parent e5f455fff3
commit f6dfa7b25e
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;
}
}