public function onLogEvent(LogEvent $event)
    {
        $context = $event->getContext();
        $context['event.name'] = $event->getEventNameContext();

        $eventSubscriberClassName = get_class($event->getEventSubscriberContext());
        if (strrpos($eventSubscriberClassName, '\\') !== false) {
            $eventSubscriberClassName = substr($eventSubscriberClassName, strrpos($eventSubscriberClassName, '\\') + 1);
        }
        $context['event.task.name'] = $eventSubscriberClassName;

        $this->logger->log($event->getLevel(), $event->getMessage(), $context);
    }
public function onLogEvent(LogEvent $event)
    {
        $context = $event->getContext();
        $context['event.name'] = $event->getEventNameContext();

        $eventSubscriberClassName = get_class($event->getEventSubscriberContext());
        if (strrpos($eventSubscriberClassName, '\\') !== false) {
            $eventSubscriberClassName = substr($eventSubscriberClassName, strrpos($eventSubscriberClassName, '\\') + 1);
        }
        $context['event.task.name'] = $eventSubscriberClassName;

        $this->logger->log($event->getLevel(), $event->getMessage(), $context);
    }
public function onLogEvent ( LogEvent $ event ) { $ context = $ event -> getContext ( ) ; $ context [ 'event.name' ] = $ event -> getEventNameContext ( ) ; $ eventSubscriberClassName = get_class ( $ event -> getEventSubscriberContext ( ) ) ; if ( strrpos ( $ eventSubscriberClassName , '\\' ) !== false ) { $ eventSubscriberClassName = substr ( $ eventSubscriberClassName , strrpos ( $ eventSubscriberClassName , '\\' ) + 1 ) ; } $ context [ 'event.task.name' ] = $ eventSubscriberClassName ; $ this -> logger -> log ( $ event -> getLevel ( ) , $ event -> getMessage ( ) , $ context ) ; }
Logs the LogEvent to the logger instance.

@param LogEvent $event
Logs the LogEvent to the logger instance .