mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-07 05:36:45 +02:00
Skip WebProcessor on CLI, fixes #36
This commit is contained in:
@@ -40,6 +40,12 @@ class WebProcessor
|
|||||||
*/
|
*/
|
||||||
public function __invoke(array $record)
|
public function __invoke(array $record)
|
||||||
{
|
{
|
||||||
|
// skip processing if for some reason request data
|
||||||
|
// is not present (CLI or wonky SAPIs)
|
||||||
|
if (!isset($this->serverData['REQUEST_URI'])) {
|
||||||
|
return $record;
|
||||||
|
}
|
||||||
|
|
||||||
$record['extra'] = array_merge(
|
$record['extra'] = array_merge(
|
||||||
$record['extra'],
|
$record['extra'],
|
||||||
array(
|
array(
|
||||||
|
Reference in New Issue
Block a user