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

11 years ago
  1. <?php namespace Majestic\Logger;
  2. /**
  3. * @copyright NetMonsters <team@netmonsters.ru>
  4. * @link http://netmonsters.ru
  5. * @package Majestic
  6. * @subpackage Logger
  7. * @since 21-11-2011
  8. * @user: agrebnev
  9. */
  10. class CliLogger extends Logger
  11. {
  12. protected function concreteLog($message)
  13. {
  14. // Заменяем окончания строк на их символы
  15. $message = str_replace(array("\r", "\n"), array('\r', '\n'), $message);
  16. $out = $this->generateOutString($message);
  17. print($out);
  18. }
  19. protected function generateOutString($message)
  20. {
  21. return microtime(true) . " \t: " . $this->pid . trim($message) . PHP_EOL;
  22. }
  23. }