Skip to content

Commit 638aa8c

Browse files
committed
Optimized exception log
1 parent 519e55d commit 638aa8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Exception/Handler/AppExceptionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(StdoutLoggerInterface $logger)
3232

3333
public function handle(Throwable $throwable, ResponseInterface $response)
3434
{
35-
$this->logger->error($throwable->getMessage());
35+
$this->logger->error(sprintf('%s[%s] in %s', $throwable->getMessage(), $throwable->getLine(), $throwable->getFile()));
3636
$this->logger->error($throwable->getTraceAsString());
3737
return $response->withStatus(500)->withBody(new SwooleStream('Internal Server Error.'));
3838
}

0 commit comments

Comments
 (0)