StdOut.php 679 B

123456789101112131415161718192021222324252627282930
  1. <?php defined('SYSPATH') OR die('No direct script access.');
  2. /**
  3. * STDOUT log writer. Writes out messages to STDOUT.
  4. *
  5. * @package Kohana
  6. * @category Logging
  7. * @author Kohana Team
  8. * @copyright (c) 2008-2012 Kohana Team
  9. * @license http://kohanaphp.com/license
  10. */
  11. class Kohana_Log_StdOut extends Log_Writer {
  12. /**
  13. * Writes each of the messages to STDOUT.
  14. *
  15. * $writer->write($messages);
  16. *
  17. * @param array $messages
  18. * @return void
  19. */
  20. public function write(array $messages)
  21. {
  22. foreach ($messages as $message)
  23. {
  24. // Writes out each message
  25. fwrite(STDOUT, $this->format_message($message).PHP_EOL);
  26. }
  27. }
  28. } // End Kohana_Log_StdOut