MediaWiki  master
LegacyFormatter.php
Go to the documentation of this file.
1 <?php
21 namespace MediaWiki\Logger\Monolog;
22 
24 use Monolog\Formatter\NormalizerFormatter;
25 
36 class LegacyFormatter extends NormalizerFormatter {
37 
38  public function __construct() {
39  parent::__construct( 'c' );
40  }
41 
42  public function format( array $record ) {
43  $normalized = parent::format( $record );
44  return LegacyLogger::format(
45  $normalized['channel'], $normalized['message'], $normalized
46  );
47  }
48 }
MediaWiki\Logger\Monolog\LegacyFormatter\__construct
__construct()
Definition: LegacyFormatter.php:38
MediaWiki\Logger\Monolog
Definition: AvroFormatter.php:21
MediaWiki\Logger\Monolog\LegacyFormatter
Log message formatter that mimics the legacy log message formatting of wfDebug, wfDebugLog,...
Definition: LegacyFormatter.php:36
MediaWiki\Logger\Monolog\LegacyFormatter\format
format(array $record)
Definition: LegacyFormatter.php:42
MediaWiki\Logger\LegacyLogger\format
static format( $channel, $message, $context)
Format a message.
Definition: LegacyLogger.php:282
MediaWiki\Logger\LegacyLogger
PSR-3 logger that mimics the historic implementation of MediaWiki's former wfErrorLog logging impleme...
Definition: LegacyLogger.php:51