class RefererProcessor in Monolog 2.x
Same name and namespace in other branches
- 8 src/Logger/Processor/RefererProcessor.php \Drupal\monolog\Logger\Processor\RefererProcessor
Class RefererProcessor.
Hierarchy
- class \Drupal\monolog\Logger\Processor\AbstractRequestProcessor
- class \Drupal\monolog\Logger\Processor\RefererProcessor
Expanded class hierarchy of RefererProcessor
1 string reference to 'RefererProcessor'
1 service uses RefererProcessor
File
- src/
Logger/ Processor/ RefererProcessor.php, line 8
Namespace
Drupal\monolog\Logger\ProcessorView source
class RefererProcessor extends AbstractRequestProcessor {
/**
* {@inheritdoc}
*/
public function __invoke(array $record) {
if ($request = $this
->getRequest()) {
$record['extra']['referer'] = $request->headers
->get('Referer', '');
}
return $record;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractRequestProcessor:: |
private | property | ||
AbstractRequestProcessor:: |
public | function | ||
AbstractRequestProcessor:: |
public | function | RequestProcessor constructor. | |
RefererProcessor:: |
public | function |