AwsInspector\Command\CloudwatchLogs\TailCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $logGroupName = $input->getArgument('group');
        $logStream = $input->getArgument('stream');
        $repository = new Repository();
        $nextForwardToken = null;
        do {
            $output->writeln('<fg=yellow>(Polling...)</>');
            $events = $repository->findLogEvents($logGroupName, $logStream, $nextForwardToken);
            $output->write(implode('', $this->decorateLog($events)));
            sleep(10);
        } while (true);
    }