adt / error-logger
Installs: 43 582
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 17
Forks: 0
Open Issues: 0
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-11-13 10:55:26 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; }