Skip to content

Commit

Permalink
Better NewRelicHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed Sep 8, 2014
1 parent 292b276 commit 7016e8e
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions src/Kdyby/Monolog/Handler/NewRelicHandler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

/**
* This file is part of the Kdyby (http://www.kdyby.org)
*
* Copyright (c) 2008 Filip Procházka ([email protected])
*
* For the full copyright and license information, please view the file license.txt that was distributed with this source code.
*/

namespace Kdyby\Monolog\Handler;

use Kdyby;
use Monolog;
use Nette;



/**
* @author Filip Procházka <[email protected]>
*/
class NewRelicHandler extends Monolog\Handler\NewRelicHandler
{

/**
* {@inheritdoc}
*/
protected function write(array $record)
{
if (!$this->isNewRelicEnabled()) {
return;
}

parent::write($record);
}



/**
* {@inheritdoc}
*/
public function isHandling(array $record)
{
if (!$this->isNewRelicEnabled()) {
return FALSE;
}

return parent::isHandling($record);
}

}

0 comments on commit 7016e8e

Please sign in to comment.