MediaWiki  1.23.13
MediaWiki\Logger\BackcompatLogger Class Reference

PSR-3 logger that wraps wfDebugLog() for backwards compatibility. More...

Inheritance diagram for MediaWiki\Logger\BackcompatLogger:
Collaboration diagram for MediaWiki\Logger\BackcompatLogger:

Public Member Functions

 __construct ( $channel)
 
 log ( $level, $message, array $context=array())
 Logs with an arbitrary level. More...
 
- Public Member Functions inherited from Psr\Log\AbstractLogger
 alert ($message, array $context=array())
 Action must be taken immediately. More...
 
 critical ($message, array $context=array())
 Critical conditions. More...
 
 debug ($message, array $context=array())
 Detailed debug information. More...
 
 emergency ($message, array $context=array())
 System is unusable. More...
 
 error ($message, array $context=array())
 Runtime errors that do not require immediate action but should typically be logged and monitored. More...
 
 info ($message, array $context=array())
 Interesting events. More...
 
 notice ($message, array $context=array())
 Normal but significant events. More...
 
 warning ($message, array $context=array())
 Exceptional occurrences that are not errors. More...
 

Static Private Member Functions

static interpolate ( $message, array $context=array())
 Interpolate context values into the message placeholders. More...
 

Private Attributes

string $channel
 $channel More...
 

Detailed Description

PSR-3 logger that wraps wfDebugLog() for backwards compatibility.

All levels are passed to wfDebugLog() with the specific level being ignored.

See also
\MediaWiki\Logger\LoggerFactory
Since
1.23.10
Author
Bryan Davis bd808.nosp@m.@wik.nosp@m.imedi.nosp@m.a.or.nosp@m.g
Note
© 2015 Bryan Davis and Wikimedia Foundation.

Definition at line 35 of file BackcompatLogger.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Logger\BackcompatLogger::__construct (   $channel)
Parameters
string$channel

Definition at line 44 of file BackcompatLogger.php.

References MediaWiki\Logger\BackcompatLogger\$channel.

Member Function Documentation

◆ interpolate()

static MediaWiki\Logger\BackcompatLogger::interpolate (   $message,
array  $context = array() 
)
staticprivate

Interpolate context values into the message placeholders.

Copied from PSR-3 specification.

string $message array $context string

Definition at line 74 of file BackcompatLogger.php.

References MediaWiki\$context, array(), and as.

◆ log()

MediaWiki\Logger\BackcompatLogger::log (   $level,
  $message,
array  $context = array() 
)

Logs with an arbitrary level.

Log events are converted into wfDebugLog() calls after interpolating the message with the provided context.

Parameters
mixed$level
string$message
array$context

Implements Psr\Log\LoggerInterface.

Definition at line 58 of file BackcompatLogger.php.

References MediaWiki\$context, and wfDebugLog().

Member Data Documentation

◆ $channel

string MediaWiki\Logger\BackcompatLogger::$channel
private

$channel

Definition at line 39 of file BackcompatLogger.php.

Referenced by MediaWiki\Logger\BackcompatLogger\__construct().


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