You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
681 B

<?php namespace Majestic\Logger;
/**
* @copyright NetMonsters <team@netmonsters.ru>
* @link http://netmonsters.ru
* @package Majestic
* @subpackage Logger
* @since 21-11-2011
* @user: agrebnev
*/
class CliLogger extends Logger
{
protected function concreteLog($message)
{
// Заменяем окончания строк на их символы
$message = str_replace(array("\r", "\n"), array('\r', '\n'), $message);
$out = $this->generateOutString($message);
print($out);
}
protected function generateOutString($message)
{
return microtime(true) . " \t: " . $this->pid . trim($message) . PHP_EOL;
}
}