1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 17:46:09 +02:00

Fix displaying anonymous classes

This commit is contained in:
Nicolas Grekas
2018-08-17 09:54:55 +02:00
parent c465e11445
commit 9117a6c747
7 changed files with 32 additions and 13 deletions

View File

@@ -14,6 +14,7 @@ namespace Monolog;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
use Monolog\Handler\AbstractHandler;
use Monolog\Registry;
/**
* Monolog error handler
@@ -133,7 +134,7 @@ class ErrorHandler
{
$this->logger->log(
$this->uncaughtExceptionLevel === null ? LogLevel::ERROR : $this->uncaughtExceptionLevel,
sprintf('Uncaught Exception %s: "%s" at %s line %s', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()),
sprintf('Uncaught Exception %s: "%s" at %s line %s', Registry::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()),
array('exception' => $e)
);