Skip to content

AppsDevTeam/error-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ErrorLogger

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 = '[email protected]', 
	$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;
}