Skip to content

Commit

Permalink
add option to not print log text to console on analyze command
Browse files Browse the repository at this point in the history
  • Loading branch information
itismadness committed Apr 29, 2020
1 parent 525b5fc commit a1086e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Command/AnalyzeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ protected function configure()
->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');
}
Expand Down Expand Up @@ -55,6 +56,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}

if ($input->getOption('no_text')) {
return 0;
}
$output->writeln('');
$output->writeln('Log Text:');
$output->writeln('');
Expand Down

0 comments on commit a1086e9

Please sign in to comment.