Skip to content

Commit

Permalink
Rename output and only breakline on info().
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Apr 6, 2020
1 parent d773bae commit ca41fef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Log/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ public function __construct(WritableStreamInterface $writer, CLImate $climate)
$this->writer = $writer;
$this->climate = $climate;

$climate->output->add('stream', $this);
$climate->output->defaultTo('stream');
$climate->output->add('logger', $this);
$climate->output->defaultTo('logger');
}

/**
* Send info message.
*/
public function info(string $message): void
{
$this->write($message);
$this->write("{$message}\n");
}

/**
Expand All @@ -67,6 +67,6 @@ public function error(string $message): void
*/
public function write($content)
{
$this->writer->write("{$content}\n");
$this->writer->write($content);
}
}

0 comments on commit ca41fef

Please sign in to comment.