MediaWiki master
MediaWiki\Logger\ConsoleLogger Class Reference

Write logs to command-line output (STDERR). More...

Inherits AbstractLogger.

Collaboration diagram for MediaWiki\Logger\ConsoleLogger:

Public Member Functions

 __construct (string $channel, string $minLevel=null, LoggerInterface $forwardTo=null)
 
 log ( $level, $message, array $context=[])
 

Detailed Description

Write logs to command-line output (STDERR).

The output is supposed to be human-readable, and should be changed as necessary to better achieve that goal.

This is developed for use in maintenance/eval.php.

Access: internal
For use in MediaWiki core only
Since
1.30

Definition at line 22 of file ConsoleLogger.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Logger\ConsoleLogger::__construct ( string $channel,
string $minLevel = null,
LoggerInterface $forwardTo = null )
Parameters
string$channellog channel name.
string | null$minLevelMinimum PSR-3 level below which messages are ignored.
LoggerInterface | null$forwardToOther logger to forward to.

Definition at line 43 of file ConsoleLogger.php.

Member Function Documentation

◆ log()

MediaWiki\Logger\ConsoleLogger::log ( $level,
$message,
array $context = [] )

Definition at line 59 of file ConsoleLogger.php.

References MediaWiki\Logger\LegacyLogger\format().


The documentation for this class was generated from the following file: