1
0
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:
Jordi Boggiano
2011-07-06 15:37:50 +02:00
parent cf4240cc51
commit cf247ca0ac

View File

@@ -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(