adt / error-logger
v3.1.3
2023-08-09 21:47 UTC
Requires
- php: >=7.4
- tracy/tracy: >=2.6.0
Suggests
- adt/tracy-git: Useful for displaying information about currently deployed application version.
This package is auto-updated.
Last update: 2024-09-13 10:15:31 UTC
README
比Tracy\Logger更详细地发送错误信息。此外,它还可以发送多个错误,而不仅仅是第一个。
安装
composer require adt/error-logger
在调用 $configurator->enableDebugger()
后,将此代码放入您的bootstrap.php中
$logger = \ADT\ErrorLogger::install( $email = 'errors@example.com', $maxEmailsPerDay = 100, $maxEmailsPerRequest = 10, $includeExceptionFile = true, $errorMessageSanitizeRegex = '~\d|(/[^\s]*)|(\w+://)~', // removes all numbers, absolut paths and protocols $emailSnooze = '1 day' ); if (!\Tracy\Debugger::$productionMode) { // Do not send emails $logger->mailer = null; }