MediaWiki
REL1_39
ConsoleLogger.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\Logger
;
4
5
use Psr\Log\AbstractLogger;
6
12
class
ConsoleLogger
extends
AbstractLogger {
14
private
$channel;
15
19
public
function
__construct
( $channel ) {
20
$this->channel = $channel;
21
}
22
26
public
function
log
( $level, $message, array $context = [] ) {
27
fwrite( STDERR,
"[$level] "
.
28
LegacyLogger::format
( $this->channel, $message, $context ) );
29
}
30
}
MediaWiki\Logger\ConsoleLogger
A logger which writes to the terminal.
Definition
ConsoleLogger.php:12
MediaWiki\Logger\ConsoleLogger\log
log( $level, $message, array $context=[])
Definition
ConsoleLogger.php:26
MediaWiki\Logger\ConsoleLogger\__construct
__construct( $channel)
Definition
ConsoleLogger.php:19
MediaWiki\Logger\LegacyLogger\format
static format( $channel, $message, $context)
Format a message.
Definition
LegacyLogger.php:285
MediaWiki\Logger
Definition
ConsoleLogger.php:3
includes
debug
logger
ConsoleLogger.php
Generated on Thu Nov 21 2024 05:22:41 for MediaWiki by
1.10.0