function DumpCompletionCommand::tailDebugLog
1 call to DumpCompletionCommand::tailDebugLog()
- DumpCompletionCommand::execute in vendor/
symfony/ console/ Command/ DumpCompletionCommand.php - Executes the current command.
File
-
vendor/
symfony/ console/ Command/ DumpCompletionCommand.php, line 119
Class
- DumpCompletionCommand
- Dumps the completion script for the current shell.
Namespace
Symfony\Component\Console\CommandCode
private function tailDebugLog(string $commandName, OutputInterface $output) : void {
$debugFile = sys_get_temp_dir() . '/sf_' . $commandName . '.log';
if (!file_exists($debugFile)) {
touch($debugFile);
}
$process = new Process([
'tail',
'-f',
$debugFile,
], null, null, null, 0);
$process->run(function (string $type, string $line) use ($output) : void {
$output->write($line);
});
}