class ArrayLogger implements LoggerInterface

Saves requests information in array so they can be retrieved later.

Methods

__construct()

Empty constructor for forward compatibility.

getTimer()

Returns a timer to be used to gather timing information for the next request.

getLogs()

Returns the collected logs.

log(float $api, RequestInterface $request, TimerInterface $timer, ResponseInterface $response = null, Exception $exception = null)

Log information about a request.

Details

at line 28
__construct()

Empty constructor for forward compatibility.

at line 37
TimerInterface getTimer()

Returns a timer to be used to gather timing information for the next request.

Return Value

TimerInterface

at line 47
LogEntry[] getLogs()

Returns the collected logs.

Return Value

LogEntry[]

at line 63
log(float $api, RequestInterface $request, TimerInterface $timer, ResponseInterface $response = null, Exception $exception = null)

Log information about a request.

Parameters

float $api
RequestInterface $request
TimerInterface $timer
ResponseInterface $response
Exception $exception

Exceptions

InvalidArgumentException When $api is an unrecognized value