class Debug

Useful debugging functions (will only waste time on a development environment)

Methods

static void
startStopwatch(string $event)

Start counting time for an event

static int
finishStopwatch(string $event)

Stop counting time for an event and get its duration

static void
log(string $message, array $context = array(), string $channel = 'app')

Log a debug message

static 
logCacheFetch(string $type, int $id)

Log a cache fetch in the data collector

Details

at line line 21
static void startStopwatch(string $event)

Start counting time for an event

Parameters

string $event The event's name

Return Value

void

at line line 39
static int finishStopwatch(string $event)

Stop counting time for an event and get its duration

Parameters

string $event The event's name

Return Value

int The time in milliseconds

at line line 65
static void log(string $message, array $context = array(), string $channel = 'app')

Log a debug message

Parameters

string $message The message to return
array $context Any additional information to show
string $channel The channel to store the log into

Return Value

void

at line line 85
static logCacheFetch(string $type, int $id)

Log a cache fetch in the data collector

Parameters

string $type The type of the fetched model
int $id The ID of the fetched model