Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DumpCompletionCommand.php

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\Command

Code

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);
    });
}
RSS feed
Powered by Drupal