/**
* @param string $logFile
* @param bool $logDebug
*
* @throws \RuntimeException
*/
public function __construct($logFile, $logDebug = false)
{
if (static::$logger instanceof MainLogger) {
throw new \RuntimeException("MainLogger has been already created");
}
static::$logger = $this;
$this->logStream = \ThreadedFactory::create();
$this->start();
}