private function deleteLogFile(Vm $vm) { $filename = VmLogger::getLogFile($vm->getIdVm()); if (file_exists($filename)) { @unlink("{$filename}"); } }
public function showLog(Vm $vm) { $logFile = VmLogger::getLogFile($vm->getIdVm()); if (!file_exists($logFile)) { return null; } $geshi = new \GeSHi(file_get_contents($logFile), 'bash'); return $geshi->parse_code(); }