Log.php 435 B

123456789101112131415161718192021222324252627
  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. public function log($level, $message, array $context = [])
  20. {
  21. \think\Log::write($message);
  22. }
  23. }