RefererProcessor.php in Monolog 2.x
Same filename and directory in other branches
Namespace
Drupal\monolog\Logger\ProcessorFile
src/Logger/Processor/RefererProcessor.phpView source
<?php
namespace Drupal\monolog\Logger\Processor;
/**
* Class RefererProcessor.
*/
class RefererProcessor extends AbstractRequestProcessor {
/**
* {@inheritdoc}
*/
public function __invoke(array $record) {
if ($request = $this
->getRequest()) {
$record['extra']['referer'] = $request->headers
->get('Referer', '');
}
return $record;
}
}
Classes
Name | Description |
---|---|
RefererProcessor | Class RefererProcessor. |