3 namespace MediaWiki\Logger
;
5 use Psr\Log\AbstractLogger
;
8 * A logger which writes to the terminal. The output is supposed to be
9 * human-readable, and should be changed as necessary to better achieve that
12 class ConsoleLogger
extends AbstractLogger
{
14 * @param string $channel
16 public function __construct( $channel ) {
17 $this->channel
= $channel;
23 public function log( $level, $message, array $context = [] ) {
24 fwrite( STDERR
, "[$level] " .
25 LegacyLogger
::format( $this->channel
, $message, $context ) );