public function IpProcessor::__invoke in Monolog 2.x
Same name and namespace in other branches
- 8 src/Logger/Processor/IpProcessor.php \Drupal\monolog\Logger\Processor\IpProcessor::__invoke()
File
- src/
Logger/ Processor/ IpProcessor.php, line 13
Class
- IpProcessor
- Class IpProcessor.
Namespace
Drupal\monolog\Logger\ProcessorCode
public function __invoke(array $record) {
if ($request = $this
->getRequest()) {
$record['extra']['ip'] = $request
->getClientIp();
}
return $record;
}