for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* OnStartupHandler.php
*
* @copyright More in license.md
* @license https://www.ipublikuj.eu
* @author Adam Kadlec <[email protected]>
* @package iPublikuj:NewRelic!
* @subpackage Events
* @since 1.0.0
* @date 25.05.15
*/
declare(strict_types = 1);
namespace IPub\NewRelic\Events;
use Nette;
use Nette\Application;
use Tracy\Debugger;
use IPub;
use IPub\NewRelic\Loggers;
* On application startuo event
final class OnStartupHandler
{
* Implement nette smart magic
use Nette\SmartObject;
* @param Application\Application $application
public function __invoke(Application\Application $application) : void
// Check if new relict extension is loaded
if (!extension_loaded('newrelic')) {
return;
}
// Register new relic logger into tracy
$logger = new Loggers\Logger(Debugger::$logDirectory, Debugger::$email);
Debugger::setLogger($logger);