From a1086e95cc4252a3ce5ba049ce9500d4e0358d69 Mon Sep 17 00:00:00 2001 From: itismadness Date: Wed, 29 Apr 2020 13:09:21 +0100 Subject: [PATCH] add option to not print log text to console on analyze command --- src/Command/AnalyzeCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Command/AnalyzeCommand.php b/src/Command/AnalyzeCommand.php index 3afff7e..6c70ec2 100644 --- a/src/Command/AnalyzeCommand.php +++ b/src/Command/AnalyzeCommand.php @@ -20,6 +20,7 @@ class AnalyzeCommand extends Command ->setDescription('analyze log file') ->setHelp('This command analyzes a log file') ->addOption('html', null, InputOption::VALUE_NONE, 'Print the HTML version of log, without color') + ->addOption('no_text', null, InputOption::VALUE_NONE, 'Do not print log text to console') ->addArgument('file', InputArgument::REQUIRED, 'Log file to analyze') ->addArgument('out_file', InputArgument::OPTIONAL, 'Write HTML log to outfile'); } @@ -55,6 +56,9 @@ class AnalyzeCommand extends Command } } + if ($input->getOption('no_text')) { + return 0; + } $output->writeln(''); $output->writeln('Log Text:'); $output->writeln('');