MediaWiki
1.28.0
|
A logger that may be configured to either buffer logs or to print them to the output where PHPUnit will complain about them. More...
Public Member Functions | |
__construct ($collect=false, $filter=null) | |
clearBuffer () | |
Clear the collected log buffer. More... | |
getBuffer () | |
Return the collected logs. More... | |
log ($level, $message, array $context=[]) | |
setCollect ($collect) | |
Set the "collect" flag. More... | |
Private Attributes | |
$buffer = [] | |
$collect = false | |
$filter = null | |
A logger that may be configured to either buffer logs or to print them to the output where PHPUnit will complain about them.
Definition at line 34 of file TestLogger.php.
TestLogger::__construct | ( | $collect = false , |
|
$filter = null |
|||
) |
bool | $collect | Whether to collect logs |
callable | $filter | Filter logs before collecting/printing. Signature is string|null function ( string $message, string $level ); |
Definition at line 44 of file TestLogger.php.
TestLogger::clearBuffer | ( | ) |
Clear the collected log buffer.
Definition at line 68 of file TestLogger.php.
TestLogger::getBuffer | ( | ) |
Return the collected logs.
Definition at line 61 of file TestLogger.php.
References $buffer.
TestLogger::log | ( | $level, | |
$message, | |||
array | $context = [] |
||
) |
Definition at line 72 of file TestLogger.php.
TestLogger::setCollect | ( | $collect | ) |
Set the "collect" flag.
bool | $collect |
Definition at line 53 of file TestLogger.php.
References $collect.
|
private |
Definition at line 36 of file TestLogger.php.
Referenced by getBuffer().
|
private |
Definition at line 35 of file TestLogger.php.
Referenced by __construct(), and setCollect().
|
private |
Definition at line 37 of file TestLogger.php.
Referenced by __construct().