pocketmine\utils\MainLogger::run PHP Method

run() public method

while($this->shutdown === false){ if(!$this->write) { fclose($this->logResource); break; } $this->synchronized(function(){ while($this->logStream->count() > 0){ $chunk = $this->logStream->shift(); fwrite($this->logResource, $chunk); } $this->wait(25000); }); } if($this->logStream->count() > 0){ while($this->logStream->count() > 0){ $chunk = $this->logStream->shift(); fwrite($this->logResource, $chunk); } } fclose($this->logResource); } }
public run ( )
    public function run()
    {
        $this->shutdown = false;
        while ($this->shutdown === false) {
            $this->synchronized(function () {
                while ($this->logStream->count() > 0) {
                    $chunk = $this->logStream->shift();
                    if ($this->write) {
                        $this->logResource = file_put_contents($this->logFile, $chunk, FILE_APPEND);
                    }
                }
                $this->wait(200000);
            });
        }
        if ($this->logStream->count() > 0) {
            while ($this->logStream->count() > 0) {
                $chunk = $this->logStream->shift();
                if ($this->write) {
                    $this->logResource = file_put_contents($this->logFile, $chunk, FILE_APPEND);
                }
            }
        }
    }