forked from bazo/nette-monolog-extension
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
292b276
commit 7016e8e
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
|
||
} |