PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/rxwandc/system/classes/kohana/log/writer.php

https://bitbucket.org/i1598/caiyun_stat
PHP | 51 lines | 19 code | 4 blank | 28 comment | 0 complexity | 3840572a8d3891e148821d7000804feb MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <?php defined('SYSPATH') or die('No direct script access.');
  2. /**
  3. * Log writer abstract class. All [Log] writers must extend this class.
  4. *
  5. * @package Kohana
  6. * @category Logging
  7. * @author Kohana Team
  8. * @copyright (c) 2008-2012 Kohana Team
  9. * @license http://kohanaframework.org/license
  10. */
  11. abstract class Kohana_Log_Writer {
  12. /**
  13. * Numeric log level to string lookup table.
  14. * @var array
  15. */
  16. protected $_log_levels = array(
  17. LOG_EMERG => 'EMERGENCY',
  18. LOG_ALERT => 'ALERT',
  19. LOG_CRIT => 'CRITICAL',
  20. LOG_ERR => 'ERROR',
  21. LOG_WARNING => 'WARNING',
  22. LOG_NOTICE => 'NOTICE',
  23. LOG_INFO => 'INFO',
  24. LOG_DEBUG => 'DEBUG',
  25. 8 => 'STRACE',
  26. );
  27. /**
  28. * Write an array of messages.
  29. *
  30. * $writer->write($messages);
  31. *
  32. * @param array $messages
  33. * @return void
  34. */
  35. abstract public function write(array $messages);
  36. /**
  37. * Allows the writer to have a unique key when stored.
  38. *
  39. * echo $writer;
  40. *
  41. * @return string
  42. */
  43. final public function __toString()
  44. {
  45. return spl_object_hash($this);
  46. }
  47. } // End Kohana_Log_Writer