Log.php 496 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\common\library;
  3. use Psr\Log\AbstractLogger;
  4. use think\Hook;
  5. /**
  6. * 日志记录类
  7. */
  8. class Log extends AbstractLogger
  9. {
  10. /**
  11. * Logs with an arbitrary level.
  12. *
  13. * @param mixed $level
  14. * @param string $message
  15. * @param array $context
  16. *
  17. * @return void
  18. *
  19. * @throws \Psr\Log\InvalidArgumentException
  20. */
  21. public function log($level, $message, array $context = array())
  22. {
  23. \think\Log::write($message);
  24. }
  25. }