MathiasGrimm\LaravelLogKeeper\Repos\LocalLogsRepo::compress PHP Метод

compress() публичный Метод

public compress ( $log, $compressedName )
    public function compress($log, $compressedName)
    {
        $command = "cd {$this->localLogPath}; tar cjf {$compressedName} {$log}";
        exec($command, $output, $exit);
        if ($exit) {
            throw new Exception("Something went wrong when compressing {$log}");
        }
        $this->disk->delete("{$this->localLogPath}/{$log}");
    }