console = $output;
$outputFormatter = $this->console->getFormatter();
$outputFormatter->setStyle('detail', new OutputFormatterStyle('blue'));
$outputFormatter->setStyle('metadata', new OutputFormatterStyle('cyan'));
}
/**
* {@inheritdoc}
*/
public function logSuccess($message)
{
$this->terminateLine();
$this->console->writeln("[SUCCESS]" . ($message ? ": $message" : '') . '');
}
/**
* {@inheritdoc}
*/
public function logError(\Exception $e)
{
$this->terminateLine();
$this->console->writeln("[ERROR]: " . $e . '');
}
/**
* {@inheritdoc}
*/
public function log($message)
{
$this->terminateLine();
$this->console->writeln('' . $message . '');
}
/**
* {@inheritdoc}
*/
public function logInline($message)
{
$this->isInline = true;
$this->console->write('' . $message . '');
}
/**
* {@inheritdoc}
*/
public function logMeta($message)
{
$this->terminateLine();
$this->console->writeln('' . $message . '');
}
/**
* Terminates line if the inline logging is started
*
* @return void
*/
private function terminateLine()
{
if ($this->isInline) {
$this->isInline = false;
$this->console->writeln('');
}
}
}