瀏覽代碼

add option to not print log text to console on analyze command

tags/0.9.2
itismadness 4 年之前
父節點
當前提交
a1086e95cc
共有 1 個檔案被更改,包括 4 行新增0 行删除
  1. +4
    -0
      src/Command/AnalyzeCommand.php

+ 4
- 0
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('');


Loading…
取消
儲存