class LogListener implements EventSubscriberInterface

Logs request, response, and exceptions.

Properties

protected $logger
protected $exceptionLogFilter

Methods

__construct(LoggerInterface $logger, $exceptionLogFilter = null)

No description

onKernelRequest(GetResponseEvent $event)

Logs master requests on event KernelEvents::REQUEST.

onKernelResponse(FilterResponseEvent $event)

Logs master response on event KernelEvents::RESPONSE.

onKernelException(GetResponseForExceptionEvent $event)

Logs uncaught exceptions on event KernelEvents::EXCEPTION.

logRequest(Request $request)

Logs a request.

logResponse(Response $response)

Logs a response.

logException(Exception $e)

Logs an exception.

static 
getSubscribedEvents()

No description

Details

at line 34
__construct(LoggerInterface $logger, $exceptionLogFilter = null)

Parameters

LoggerInterface $logger
$exceptionLogFilter

at line 55
onKernelRequest(GetResponseEvent $event)

Logs master requests on event KernelEvents::REQUEST.

Parameters

GetResponseEvent $event

at line 69
onKernelResponse(FilterResponseEvent $event)

Logs master response on event KernelEvents::RESPONSE.

Parameters

FilterResponseEvent $event

at line 83
onKernelException(GetResponseForExceptionEvent $event)

Logs uncaught exceptions on event KernelEvents::EXCEPTION.

Parameters

GetResponseForExceptionEvent $event

at line 93
protected logRequest(Request $request)

Logs a request.

Parameters

Request $request

at line 103
protected logResponse(Response $response)

Logs a response.

Parameters

Response $response

at line 117
protected logException(Exception $e)

Logs an exception.

Parameters

Exception $e

at line 122
static getSubscribedEvents()