MediaWiki
1.34.4
|
Wraps another spi to capture all logs generated. More...
Public Member Functions | |
__construct (Spi $inner) | |
capture ( $log) | |
getLogger ( $channel) | |
getLogs () | |
Private Member Functions | |
createLogger ( $channel) | |
Private Attributes | |
Spi | $inner |
array | $logs = [] |
LoggerInterface[] | $singletons |
Wraps another spi to capture all logs generated.
This can be used, for example, to collect all logs generated during a unit test and report them when the test fails.
Definition at line 13 of file LogCapturingSpi.php.
MediaWiki\Logger\LogCapturingSpi::__construct | ( | Spi | $inner | ) |
Definition at line 21 of file LogCapturingSpi.php.
References MediaWiki\Logger\LogCapturingSpi\$inner.
Referenced by MediaWiki\Logger\LogCapturingSpi\createLogger().
MediaWiki\Logger\LogCapturingSpi::capture | ( | $log | ) |
array | $log |
Definition at line 46 of file LogCapturingSpi.php.
Referenced by MediaWiki\Logger\LogCapturingSpi\createLogger().
|
private |
string | $channel |
Definition at line 54 of file LogCapturingSpi.php.
References MediaWiki\$context, MediaWiki\Logger\LogCapturingSpi\$inner, MediaWiki\Logger\LogCapturingSpi\__construct(), MediaWiki\Logger\LogCapturingSpi\capture(), and MediaWiki\Logger\Spi\getLogger().
Referenced by MediaWiki\Logger\LogCapturingSpi\getLogger().
MediaWiki\Logger\LogCapturingSpi::getLogger | ( | $channel | ) |
string | $channel |
Implements MediaWiki\Logger\Spi.
Definition at line 36 of file LogCapturingSpi.php.
References MediaWiki\Logger\LogCapturingSpi\createLogger().
MediaWiki\Logger\LogCapturingSpi::getLogs | ( | ) |
Definition at line 28 of file LogCapturingSpi.php.
References MediaWiki\Logger\LogCapturingSpi\$logs.
|
private |
Definition at line 17 of file LogCapturingSpi.php.
Referenced by MediaWiki\Logger\LogCapturingSpi\__construct(), and MediaWiki\Logger\LogCapturingSpi\createLogger().
|
private |
Definition at line 19 of file LogCapturingSpi.php.
Referenced by MediaWiki\Logger\LogCapturingSpi\getLogs().
|
private |
Definition at line 15 of file LogCapturingSpi.php.