MediaWiki master
|
Wrap another Spi and keep a copy of all log messages. More...
Inherits MediaWiki\Logger\Spi.
Public Member Functions | |
__construct (Spi $inner) | |
capture ( $log) | |
getInnerSpi () | |
getLogger ( $channel) | |
getLogs () | |
setLoggerForTest ( $channel, LoggerInterface $logger=null) | |
Wrap another Spi and keep a copy of all log messages.
This is developed for use by PHPUnit bootstrapping, to collect logs generated during a given unit test, and print them after a failing test.
Definition at line 17 of file LogCapturingSpi.php.
MediaWiki\Logger\LogCapturingSpi::__construct | ( | Spi | $inner | ) |
Definition at line 25 of file LogCapturingSpi.php.
MediaWiki\Logger\LogCapturingSpi::capture | ( | $log | ) |
array | $log |
Definition at line 50 of file LogCapturingSpi.php.
MediaWiki\Logger\LogCapturingSpi::getInnerSpi | ( | ) |
Definition at line 90 of file LogCapturingSpi.php.
MediaWiki\Logger\LogCapturingSpi::getLogger | ( | $channel | ) |
string | $channel |
Implements MediaWiki\Logger\Spi.
Definition at line 40 of file LogCapturingSpi.php.
MediaWiki\Logger\LogCapturingSpi::getLogs | ( | ) |
Definition at line 32 of file LogCapturingSpi.php.
MediaWiki\Logger\LogCapturingSpi::setLoggerForTest | ( | $channel, | |
LoggerInterface | $logger = null ) |
string | $channel | |
LoggerInterface | null | $logger |
Definition at line 100 of file LogCapturingSpi.php.