pocketmine\utils\MainLogger::__construct PHP Méthode

__construct() public méthode

public __construct ( string $logFile, boolean $logDebug = false )
$logFile string
$logDebug boolean
    public function __construct($logFile, $logDebug = false)
    {
        if (static::$logger instanceof MainLogger) {
            throw new \RuntimeException("MainLogger has been already created");
        }
        static::$logger = $this;
        touch($logFile);
        $this->logFile = $logFile;
        $this->logDebug = (bool) $logDebug;
        $this->logStream = new \Threaded();
        $this->start();
    }