This is for classes with a single undeclared property - aside from BlockManager: I3f51fd3579514b83b567dfe20926df2f0930dc85 removed the declaration of $permissionManager without actually removing all uses. Change-Id: Ic2a95f77071312041be6e0633ea9b5325e98de42
30 lines
620 B
PHP
30 lines
620 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Logger;
|
|
|
|
use Psr\Log\AbstractLogger;
|
|
|
|
/**
|
|
* A logger which writes to the terminal. The output is supposed to be
|
|
* human-readable, and should be changed as necessary to better achieve that
|
|
* goal.
|
|
*/
|
|
class ConsoleLogger extends AbstractLogger {
|
|
/** @var string */
|
|
private $channel;
|
|
|
|
/**
|
|
* @param string $channel
|
|
*/
|
|
public function __construct( $channel ) {
|
|
$this->channel = $channel;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function log( $level, $message, array $context = [] ) {
|
|
fwrite( STDERR, "[$level] " .
|
|
LegacyLogger::format( $this->channel, $message, $context ) );
|
|
}
|
|
}
|