\Pop\Debug\HandlerLogHandler

Debug query handler class

Summary

Methods
Properties
Constants
__construct()
setName()
getName()
prepare()
prepareHeaderAsString()
prepareAsString()
setLogger()
hasLogger()
getLogger()
logger()
emergency()
alert()
critical()
error()
warning()
notice()
info()
debug()
log()
hasEntries()
getMessages()
__get()
No public properties found
No constants found
No protected methods found
$name
$logger
$entries
N/A
No private methods found
No private properties found
N/A

Properties

$name

$name : string

Name of time measurement

Type

string

$entries

$entries : array

Entries

Type

array

Methods

__construct()

__construct(\Pop\Log\Logger  $logger = null, string  $name = null) 

Constructor

Instantiate a log handler object

Parameters

\Pop\Log\Logger $logger
string $name

getName()

getName() : string

Get name

Returns

string

prepare()

prepare() : array

Prepare handler data for storage

Returns

array

prepareHeaderAsString()

prepareHeaderAsString() : string

Prepare header string

Returns

string

prepareAsString()

prepareAsString() : string

Prepare handler data as string

Returns

string

setLogger()

setLogger(\Pop\Log\Logger  $logger) : self

Set logger

Parameters

\Pop\Log\Logger $logger

Returns

self

hasLogger()

hasLogger() : boolean

Determine if the handler has a logger

Returns

boolean

getLogger()

getLogger() : \Pop\Log\Logger

Get logger

Returns

\Pop\Log\Logger

logger()

logger() : \Pop\Log\Logger

Get logger (alias method)

Returns

\Pop\Log\Logger

emergency()

emergency(mixed  $message, array  $context = array()) : \Pop\Debug\Handler\LogHandler

Add an EMERGENCY log entry

Parameters

mixed $message
array $context

Returns

\Pop\Debug\Handler\LogHandler

alert()

alert(mixed  $message, array  $context = array()) : \Pop\Debug\Handler\LogHandler

Add an ALERT log entry

Parameters

mixed $message
array $context

Returns

\Pop\Debug\Handler\LogHandler

critical()

critical(mixed  $message, array  $context = array()) : \Pop\Debug\Handler\LogHandler

Add a CRITICAL log entry

Parameters

mixed $message
array $context

Returns

\Pop\Debug\Handler\LogHandler

error()

error(mixed  $message, array  $context = array()) : \Pop\Debug\Handler\LogHandler

Add an ERROR log entry

Parameters

mixed $message
array $context

Returns

\Pop\Debug\Handler\LogHandler

warning()

warning(mixed  $message, array  $context = array()) : \Pop\Debug\Handler\LogHandler

Add a WARNING log entry

Parameters

mixed $message
array $context

Returns

\Pop\Debug\Handler\LogHandler

notice()

notice(mixed  $message, array  $context = array()) : \Pop\Debug\Handler\LogHandler

Add a NOTICE log entry

Parameters

mixed $message
array $context

Returns

\Pop\Debug\Handler\LogHandler

info()

info(mixed  $message, array  $context = array()) : \Pop\Debug\Handler\LogHandler

Add an INFO log entry

Parameters

mixed $message
array $context

Returns

\Pop\Debug\Handler\LogHandler

debug()

debug(mixed  $message, array  $context = array()) : \Pop\Debug\Handler\LogHandler

Add a DEBUG log entry

Parameters

mixed $message
array $context

Returns

\Pop\Debug\Handler\LogHandler

log()

log(mixed  $level, mixed  $message, array  $context = array()) : \Pop\Debug\Handler\LogHandler

Add a log entry

Parameters

mixed $level
mixed $message
array $context

Returns

\Pop\Debug\Handler\LogHandler

hasEntries()

hasEntries() : boolean

Determine if the handler has entries

Returns

boolean

getMessages()

getMessages() : array

Get entries

Returns

array

__get()

__get(string  $name) : mixed

Magic get method to return the logger.

Parameters

string $name

Returns

mixed