Permalink
Browse files

colorized output for the foq:elastica:populate command

  • Loading branch information...
1 parent 5d1f4f2 commit 23c96510d801b0a213692ba5fec89fc23bbaad8d @matteosister matteosister committed Sep 19, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 Command/PopulateCommand.php
@@ -91,21 +91,21 @@ protected function execute(InputInterface $input, OutputInterface $output)
private function populateIndex(OutputInterface $output, $index, $reset)
{
if ($reset) {
- $output->writeln(sprintf('Resetting: %s', $index));
+ $output->writeln(sprintf('<info>Resetting</info> <comment>%s</comment>', $index));
$this->resetter->resetIndex($index);
}
$providers = $this->providerRegistry->getIndexProviders($index);
foreach ($providers as $type => $provider) {
$loggerClosure = function($message) use ($output, $index, $type) {
- $output->writeln(sprintf('Populating: %s/%s, %s', $index, $type, $message));
+ $output->writeln(sprintf('<info>Populating</info> %s/%s, %s', $index, $type, $message));
};
$provider->populate($loggerClosure);
}
- $output->writeln(sprintf('Refreshing: %s', $index));
+ $output->writeln(sprintf('<info>Refreshing</info> <comment>%s</comment>', $index));
$this->indexManager->getIndex($index)->refresh();
}

0 comments on commit 23c9651

Please sign in to comment.