完善日志打印

This commit is contained in:
2026-08-20 15:01:24 +08:00
parent d6a9b93f29
commit e744b1a898

View File

@@ -96,12 +96,14 @@ class Logger
if ($this->throwable !== null) {
$throwable = $this->throwable;
$previous = $throwable->getPrevious();
$content['throwable'] = [
'message' => $throwable->getMessage(),
'code' => $throwable->getCode(),
'file' => $throwable->getFile(),
'line' => $throwable->getLine(),
'trace' => $this->isError ? $throwable->getTrace() : null,
'previous_trace' => $previous ? $previous->getTrace() : null,
'data' => method_exists($throwable, 'getData') ? $throwable->getData() : null,
];
}