MediaWiki  1.23.13
BackcompatLogger.php
Go to the documentation of this file.
1 <?php
21 namespace MediaWiki\Logger;
22 
24 
36 
40  private $channel;
41 
45  public function __construct( $channel ) {
46  $this->channel = $channel;
47  }
48 
59  public function log( $level, $message, array $context = array() ) {
61  $this->channel, self::interpolate( $message, $context ), 'log'
62  );
63  }
64 
75  private static function interpolate( $message, array $context = array() ) {
76  $replace = array();
77  foreach ( $context as $key => $val ) {
78  $replace['{' . $key . '}'] = $val;
79  }
80  return strtr( $message, $replace );
81  }
82 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
wfDebugLog
wfDebugLog( $logGroup, $text, $dest='all')
Send a line to a supplementary debug log file, if configured, or main debug log if not.
Definition: GlobalFunctions.php:1087
MediaWiki\Logger
Definition: BackcompatLogger.php:21
Psr\Log\AbstractLogger
This is a simple Logger implementation that other Loggers can inherit from.
Definition: AbstractLogger.php:12
MediaWiki\Logger\BackcompatLogger
PSR-3 logger that wraps wfDebugLog() for backwards compatibility.
Definition: BackcompatLogger.php:35
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
MediaWiki\Logger\BackcompatLogger\__construct
__construct( $channel)
Definition: BackcompatLogger.php:44
MediaWiki\Logger\BackcompatLogger\$channel
string $channel
$channel
Definition: BackcompatLogger.php:39
MediaWiki\Logger\BackcompatLogger\log
log( $level, $message, array $context=array())
Logs with an arbitrary level.
Definition: BackcompatLogger.php:58
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
MediaWiki\$context
IContextSource $context
TODO: fold $output, etc, into this.
Definition: Wiki.php:33
MediaWiki\Logger\BackcompatLogger\interpolate
static interpolate( $message, array $context=array())
Interpolate context values into the message placeholders.
Definition: BackcompatLogger.php:74