StdErr.php 589 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * STDERR log writer. Writes out messages to STDERR.
  4. *
  5. * @package Kohana
  6. * @category Logging
  7. * @author Kohana Team
  8. * @copyright (c) Kohana Team
  9. * @license https://koseven.ga/LICENSE.md
  10. */
  11. class Kohana_Log_StdErr extends Log_Writer {
  12. /**
  13. * Writes each of the messages to STDERR.
  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(STDERR, $this->format_message($message).PHP_EOL);
  26. }
  27. }
  28. }