You are here

public function RequestUriProcessor::__invoke in Monolog 2.x

Same name and namespace in other branches
  1. 8 src/Logger/Processor/RequestUriProcessor.php \Drupal\monolog\Logger\Processor\RequestUriProcessor::__invoke()

Parameters

array $record:

Return value

array

File

src/Logger/Processor/RequestUriProcessor.php, line 15

Class

RequestUriProcessor
Class RequestUriProcessor.php

Namespace

Drupal\monolog\Logger\Processor

Code

public function __invoke(array $record) {
  if ($request = $this
    ->getRequest()) {
    $record['extra']['request_uri'] = $request
      ->getUri();
  }
  return $record;
}