Documentation

TestLogger extends AbstractLogger
in package

Used for testing purposes.

It records all records and gives you access to them for verification.

Table of Contents

$records  : array<string|int, mixed>
$recordsByLevel  : mixed
__call()  : mixed
alert()  : void
Action must be taken immediately.
critical()  : void
Critical conditions.
debug()  : void
Detailed debug information.
emergency()  : void
System is unusable.
error()  : void
Runtime errors that do not require immediate action but should typically be logged and monitored.
hasAlert()  :
hasAlertRecords()  :
hasAlertThatContains()  :
hasAlertThatMatches()  :
hasAlertThatPasses()  :
hasCritical()  :
hasCriticalRecords()  :
hasCriticalThatContains()  :
hasCriticalThatMatches()  :
hasCriticalThatPasses()  :
hasDebug()  :
hasDebugRecords()  :
hasDebugThatContains()  :
hasDebugThatMatches()  :
hasDebugThatPasses()  :
hasEmergency()  :
hasEmergencyRecords()  :
hasEmergencyThatContains()  :
hasEmergencyThatMatches()  :
hasEmergencyThatPasses()  :
hasError()  :
hasErrorRecords()  :
hasErrorThatContains()  :
hasErrorThatMatches()  :
hasErrorThatPasses()  :
hasInfo()  :
hasInfoRecords()  :
hasInfoThatContains()  :
hasInfoThatMatches()  :
hasInfoThatPasses()  :
hasNotice()  :
hasNoticeRecords()  :
hasNoticeThatContains()  :
hasNoticeThatMatches()  :
hasNoticeThatPasses()  :
hasRecord()  : mixed
hasRecords()  : mixed
hasRecordThatContains()  : mixed
hasRecordThatMatches()  : mixed
hasRecordThatPasses()  : mixed
hasWarning()  :
hasWarningRecords()  :
hasWarningThatContains()  :
hasWarningThatMatches()  :
hasWarningThatPasses()  :
info()  : void
Interesting events.
log()  : mixed
notice()  : void
Normal but significant events.
reset()  : mixed
warning()  : void
Exceptional occurrences that are not errors.

Properties

$records

public array<string|int, mixed> $records = []

$recordsByLevel

public mixed $recordsByLevel = []

Methods

__call()

public __call(mixed $method, mixed $args) : mixed
Parameters
$method : mixed
$args : mixed
Return values
mixed

alert()

Action must be taken immediately.

public alert(string $message[, array<string|int, mixed> $context = array() ]) : void

Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.

Parameters
$message : string
$context : array<string|int, mixed> = array()
Return values
void

critical()

Critical conditions.

public critical(string $message[, array<string|int, mixed> $context = array() ]) : void

Example: Application component unavailable, unexpected exception.

Parameters
$message : string
$context : array<string|int, mixed> = array()
Return values
void

debug()

Detailed debug information.

public debug(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = array()
Return values
void

emergency()

System is unusable.

public emergency(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = array()
Return values
void

error()

Runtime errors that do not require immediate action but should typically be logged and monitored.

public error(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = array()
Return values
void

hasAlert()

public hasAlert(mixed $record) :
Parameters
$record : mixed
Return values

hasAlertRecords()

public hasAlertRecords() :
Return values

hasAlertThatContains()

public hasAlertThatContains(mixed $message) :
Parameters
$message : mixed
Return values

hasAlertThatMatches()

public hasAlertThatMatches(mixed $message) :
Parameters
$message : mixed
Return values

hasAlertThatPasses()

public hasAlertThatPasses(mixed $message) :
Parameters
$message : mixed
Return values

hasCritical()

public hasCritical(mixed $record) :
Parameters
$record : mixed
Return values

hasCriticalRecords()

public hasCriticalRecords() :
Return values

hasCriticalThatContains()

public hasCriticalThatContains(mixed $message) :
Parameters
$message : mixed
Return values

hasCriticalThatMatches()

public hasCriticalThatMatches(mixed $message) :
Parameters
$message : mixed
Return values

hasCriticalThatPasses()

public hasCriticalThatPasses(mixed $message) :
Parameters
$message : mixed
Return values

hasDebug()

public hasDebug(mixed $record) :
Parameters
$record : mixed
Return values

hasDebugRecords()

public hasDebugRecords() :
Return values

hasDebugThatContains()

public hasDebugThatContains(mixed $message) :
Parameters
$message : mixed
Return values

hasDebugThatMatches()

public hasDebugThatMatches(mixed $message) :
Parameters
$message : mixed
Return values

hasDebugThatPasses()

public hasDebugThatPasses(mixed $message) :
Parameters
$message : mixed
Return values

hasEmergency()

public hasEmergency(mixed $record) :
Parameters
$record : mixed
Return values

hasEmergencyRecords()

public hasEmergencyRecords() :
Return values

hasEmergencyThatContains()

public hasEmergencyThatContains(mixed $message) :
Parameters
$message : mixed
Return values

hasEmergencyThatMatches()

public hasEmergencyThatMatches(mixed $message) :
Parameters
$message : mixed
Return values

hasEmergencyThatPasses()

public hasEmergencyThatPasses(mixed $message) :
Parameters
$message : mixed
Return values

hasError()

public hasError(mixed $record) :
Parameters
$record : mixed
Return values

hasErrorRecords()

public hasErrorRecords() :
Return values

hasErrorThatContains()

public hasErrorThatContains(mixed $message) :
Parameters
$message : mixed
Return values

hasErrorThatMatches()

public hasErrorThatMatches(mixed $message) :
Parameters
$message : mixed
Return values

hasErrorThatPasses()

public hasErrorThatPasses(mixed $message) :
Parameters
$message : mixed
Return values

hasInfo()

public hasInfo(mixed $record) :
Parameters
$record : mixed
Return values

hasInfoRecords()

public hasInfoRecords() :
Return values

hasInfoThatContains()

public hasInfoThatContains(mixed $message) :
Parameters
$message : mixed
Return values

hasInfoThatMatches()

public hasInfoThatMatches(mixed $message) :
Parameters
$message : mixed
Return values

hasInfoThatPasses()

public hasInfoThatPasses(mixed $message) :
Parameters
$message : mixed
Return values

hasNotice()

public hasNotice(mixed $record) :
Parameters
$record : mixed
Return values

hasNoticeRecords()

public hasNoticeRecords() :
Return values

hasNoticeThatContains()

public hasNoticeThatContains(mixed $message) :
Parameters
$message : mixed
Return values

hasNoticeThatMatches()

public hasNoticeThatMatches(mixed $message) :
Parameters
$message : mixed
Return values

hasNoticeThatPasses()

public hasNoticeThatPasses(mixed $message) :
Parameters
$message : mixed
Return values

hasRecord()

public hasRecord(mixed $record, mixed $level) : mixed
Parameters
$record : mixed
$level : mixed
Return values
mixed

hasRecords()

public hasRecords(mixed $level) : mixed
Parameters
$level : mixed
Return values
mixed

hasRecordThatContains()

public hasRecordThatContains(mixed $message, mixed $level) : mixed
Parameters
$message : mixed
$level : mixed
Return values
mixed

hasRecordThatMatches()

public hasRecordThatMatches(mixed $regex, mixed $level) : mixed
Parameters
$regex : mixed
$level : mixed
Return values
mixed

hasRecordThatPasses()

public hasRecordThatPasses(callable $predicate, mixed $level) : mixed
Parameters
$predicate : callable
$level : mixed
Return values
mixed

hasWarning()

public hasWarning(mixed $record) :
Parameters
$record : mixed
Return values

hasWarningRecords()

public hasWarningRecords() :
Return values

hasWarningThatContains()

public hasWarningThatContains(mixed $message) :
Parameters
$message : mixed
Return values

hasWarningThatMatches()

public hasWarningThatMatches(mixed $message) :
Parameters
$message : mixed
Return values

hasWarningThatPasses()

public hasWarningThatPasses(mixed $message) :
Parameters
$message : mixed
Return values

info()

Interesting events.

public info(string $message[, array<string|int, mixed> $context = array() ]) : void

Example: User logs in, SQL logs.

Parameters
$message : string
$context : array<string|int, mixed> = array()
Return values
void

log()

public log(mixed $level, mixed $message[, array<string|int, mixed> $context = [] ]) : mixed
Parameters
$level : mixed
$message : mixed
$context : array<string|int, mixed> = []
Tags
inheritdoc
Return values
mixed

notice()

Normal but significant events.

public notice(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = array()
Return values
void

reset()

public reset() : mixed
Return values
mixed

warning()

Exceptional occurrences that are not errors.

public warning(string $message[, array<string|int, mixed> $context = array() ]) : void

Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

Parameters
$message : string
$context : array<string|int, mixed> = array()
Return values
void

Search results