mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16:39 +02:00
Skip WebProcessor on CLI, fixes #36
This commit is contained in:
@@ -40,6 +40,12 @@ class WebProcessor
|
||||
*/
|
||||
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(
|
||||
|
Reference in New Issue
Block a user