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.

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

Log information about a request.

Details

at line 25
__construct()

Empty constructor for forward compatibility.

at line 34
TimerInterface getTimer()

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

Return Value

TimerInterface

at line 44
LogEntry[] getLogs()

Returns the collected logs.

Return Value

LogEntry[]

at line 62
void log(float $api, RequestInterface $request, StandardTimer $timer, ResponseInterface $response = null, Exception $exception = null)

Log information about a request.

Parameters

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

Return Value

void

Exceptions

InvalidArgumentException When $api is an unrecognized value