public function log(GitEvent $gitEvent, string $message, array $context = [], ?string $eventName = null): void
    {
        // Provide backwards compatibility with Symfony 2.
        if ($eventName === null && method_exists($gitEvent, 'getName')) {
            $eventName = $gitEvent->getName();
        }

        $method = $this->getLogLevelMapping($eventName);
        $context += ['command' => $gitEvent->getProcess()->getCommandLine()];
        $this->logger->{$method}($message, $context);
    }
public function log(GitEvent $gitEvent, string $message, array $context = [], ?string $eventName = null): void
    {
        // Provide backwards compatibility with Symfony 2.
        if ($eventName === null && method_exists($gitEvent, 'getName')) {
            $eventName = $gitEvent->getName();
        }

        $method = $this->getLogLevelMapping($eventName);
        $context += ['command' => $gitEvent->getProcess()->getCommandLine()];
        $this->logger->{$method}($message, $context);
    }
public function log ( GitEvent $ gitEvent , string $ message , array $ context = [ ] , ? string $ eventName = null ) : void { // Provide backwards compatibility with Symfony 2. if ( $ eventName === null && method_exists ( $ gitEvent , 'getName' ) ) { $ eventName = $ gitEvent -> getName ( ) ; } $ method = $ this -> getLogLevelMapping ( $ eventName ) ; $ context += [ 'command' => $ gitEvent -> getProcess ( ) -> getCommandLine ( ) ] ; $ this -> logger -> { $ method } ( $ message , $ context ) ; }
Adds a log message using the level defined in the mappings.

@param mixed[] $context
Adds a log message using the level defined in the mappings .