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: 2026-02-13 13:56:15 UTC
README
Sends more info about the error than Tracy\Logger. Moreover, it can send multiple errors not only the first.
Installation
composer require adt/error-logger
Place this to your bootstrap.php after calling $configurator->enableDebugger():
$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; }