PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/system/classes/kohana/log/stdout.php

https://bitbucket.org/Ahineya/trn_dev
PHP | 31 lines | 11 code | 1 blank | 19 comment | 0 complexity | 443d3270f0b2fac51621396f411855a3 MD5 | raw file
Possible License(s): BSD-3-Clause
  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-2011 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. // Set the log line format
  23. $format = 'time --- type: body';
  24. foreach ($messages as $message)
  25. {
  26. // Writes out each message
  27. fwrite(STDOUT, PHP_EOL.strtr($format, $message));
  28. }
  29. }
  30. } // End Kohana_Log_StdOut