1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 00:26:10 +02:00

Check if monolog runs in web context (#1024)

* Check if monolog runs in web context
This commit is contained in:
Pascal
2018-06-11 17:36:34 +02:00
committed by Jordi Boggiano
parent ff5ae5cead
commit 5bb1c5fb4f
5 changed files with 41 additions and 1 deletions

View File

@@ -21,6 +21,9 @@ use Monolog\Formatter\FormatterInterface;
*/
class FirePHPHandler extends AbstractProcessingHandler
{
use WebRequestRecognizerTrait;
/**
* WildFire JSON header message format
*/
@@ -130,7 +133,7 @@ class FirePHPHandler extends AbstractProcessingHandler
*/
protected function write(array $record)
{
if (!self::$sendHeaders) {
if (!self::$sendHeaders || !$this->isWebRequest()) {
return;
}