MediaWiki
1.33.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, $collectContext=false) | |
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... | |
setCollectContext ( $collectContext) | |
Set the collectContext flag. More... | |
Private Attributes | |
$buffer = [] | |
$collect = false | |
$collectContext = 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 33 of file TestLogger.php.
bool | $collect | Whether to collect logs. |
callable | null | $filter | Filter logs before collecting/printing. Signature is string|null function ( string $message, string $level, array $context ); |
bool | $collectContext | Whether to keep the context passed to log (since 1.29, |
Definition at line 46 of file TestLogger.php.
References $collect, $collectContext, and $filter.
TestLogger::clearBuffer | ( | ) |
Clear the collected log buffer.
Definition at line 86 of file TestLogger.php.
Referenced by MediaWiki\Session\SessionManagerTest\testLoadSessionInfoFromStore().
TestLogger::getBuffer | ( | ) |
Return the collected logs.
Definition at line 79 of file TestLogger.php.
References $buffer.
Referenced by MediaWiki\Session\SessionManagerTest\testLoadSessionInfoFromStore().
TestLogger::log | ( | $level, | |
$message, | |||
array | $context = [] |
||
) |
Definition at line 90 of file TestLogger.php.
References $context.
TestLogger::setCollect | ( | $collect | ) |
Set the "collect" flag.
bool | $collect |
Definition at line 57 of file TestLogger.php.
References $collect.
TestLogger::setCollectContext | ( | $collectContext | ) |
Set the collectContext flag.
bool | $collectContext |
Definition at line 69 of file TestLogger.php.
References $collectContext.
|
private |
Definition at line 36 of file TestLogger.php.
Referenced by getBuffer().
|
private |
Definition at line 34 of file TestLogger.php.
Referenced by __construct(), and setCollect().
|
private |
Definition at line 35 of file TestLogger.php.
Referenced by __construct(), and setCollectContext().
|
private |
Definition at line 37 of file TestLogger.php.
Referenced by __construct().