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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user