Skip to content

Commit

Permalink
Fix incorrect types used.
Browse files Browse the repository at this point in the history
Switch how the newline is generated for console logging.

Refs #7049
  • Loading branch information
markstory committed Jul 17, 2015
1 parent d44cb7a commit 1afa7ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Log/Engine/ConsoleLog.php
Expand Up @@ -89,7 +89,7 @@ public function __construct(array $config = [])
public function log($level, $message, array $context = [])
{
$message = $this->_format($message, $context);
$output = date('Y-m-d H:i:s') . ' ' . ucfirst($level) . ': ' . $message . "\n";
return $this->_output->write(sprintf('<%s>%s</%s>', $level, $output, $level), false);
$output = date('Y-m-d H:i:s') . ' ' . ucfirst($level) . ': ' . $message;
return $this->_output->write(sprintf('<%s>%s</%s>', $level, $output, $level));
}
}
2 changes: 1 addition & 1 deletion tests/TestCase/Log/Engine/ConsoleLogTest.php
Expand Up @@ -35,7 +35,7 @@ public function testConsoleOutputlogs()
$output->expects($this->at(0))
->method('outputAs');

$message = " Error: oh noes\n</error>";
$message = " Error: oh noes</error>";
$output->expects($this->at(1))
->method('write')
->with($this->stringContains($message));
Expand Down

0 comments on commit 1afa7ec

Please sign in to comment.