在webman-admin中自定义异常类,发现log出问题。

roczyl

查看了一下class ExceptionHandler implements ExceptionHandlerInterface,
发现
public function __construct($logger, $debug)
{
$this->logger = $logger;
$this->debug = $debug;
}

请问,自定的异常类,初始化是在哪里?$logger定义又应该在哪里呢?

1548 1 0
1个回答

walkor 打赏

异常类在 vendor/workerman/webman-framework/src/support/App.php 的 exceptionResponse()方法里初始化的。
$logger 是 vendor/workerman/webman-framework/src/support/Log.php的 channel()方法里初始化的

  • 暂无评论
年代过于久远,无法发表回答
🔝