* The '--tidy' option to maintenance/parse.php has been removed. Tidying
the output is now the default. Use '--no-tidy' to bypass the tidy
phase.
+* The global function wfErrorLog, deprecated since 1.25, has now been removed.
+ Use MWLoggerLegacyLogger::emit or UDPTransport.
=== Deprecations in 1.32 ===
* HTMLForm::setSubmitProgressive() is deprecated. No need to call it. Submit
MWDebug::warning( $msg, $callerOffset + 1, $level, 'production' );
}
-/**
- * Log to a file without getting "file size exceeded" signals.
- *
- * Can also log to TCP or UDP with the syntax udp://host:port/prefix. This will
- * send lines to the specified port, prefixed by the specified prefix and a space.
- * @since 1.25 support for additional context data
- *
- * @param string $text
- * @param string $file Filename
- * @param array $context Additional logging context data
- * @throws MWException
- * @deprecated since 1.25 Use \MediaWiki\Logger\LegacyLogger::emit or UDPTransport
- */
-function wfErrorLog( $text, $file, array $context = [] ) {
- wfDeprecated( __METHOD__, '1.25' );
- $logger = LoggerFactory::getInstance( 'wfErrorLog' );
- $context['destination'] = $file;
- $logger->info( trim( $text ), $context );
-}
-
/**
* @todo document
* @todo Move logic to MediaWiki.php
use UDPTransport;
/**
- * PSR-3 logger that mimics the historic implementation of MediaWiki's
+ * PSR-3 logger that mimics the historic implementation of MediaWiki's former
* wfErrorLog logging implementation.
*
* This logger is configured by the following global configuration variables:
// specfied.
$shouldEmit = (bool)$wgDBerrorLog;
- } elseif ( $channel === 'wfErrorLog' ) {
- // All messages on the wfErrorLog channel should be emitted.
- $shouldEmit = true;
-
} elseif ( $channel === 'wfDebug' ) {
// wfDebug messages are emitted if a catch all logging file has
// been specified. Checked explicitly so that 'private' flagged
/**
* Format a message.
*
- * Messages to the 'wfDebug', 'wfLogDBError' and 'wfErrorLog' channels
- * receive special formatting to mimic the historic output of the functions
- * of the same name. All other channel values are formatted based on the
- * historic output of the `wfDebugLog()` global function.
+ * Messages to the 'wfDebug' and 'wfLogDBError' channels receive special formatting to mimic the
+ * historic output of the functions of the same name. All other channel values are formatted
+ * based on the historic output of the `wfDebugLog()` global function.
*
* @param string $channel
* @param string $message
} elseif ( $channel === 'wfLogDBError' ) {
$text = self::formatAsWfLogDBError( $channel, $message, $context );
- } elseif ( $channel === 'wfErrorLog' ) {
- $text = "{$message}\n";
-
} elseif ( $channel === 'profileoutput' ) {
// Legacy wfLogProfilingData formatitng
$forward = '';
use Monolog\Formatter\NormalizerFormatter;
/**
- * Log message formatter that mimics the legacy log message formatting of
- * `wfDebug`, `wfDebugLog`, `wfLogDBError` and `wfErrorLog` global functions by
- * delegating the formatting to \MediaWiki\Logger\LegacyLogger.
+ * Log message formatter that mimics the legacy log message formatting of `wfDebug`, `wfDebugLog`,
+ * `wfLogDBError` and the former `wfErrorLog` global functions by delegating the formatting to
+ * \MediaWiki\Logger\LegacyLogger.
*
* @since 1.25
* @copyright © 2013 Wikimedia Foundation and contributors
use UnexpectedValueException;
/**
- * Log handler that replicates the behavior of MediaWiki's wfErrorLog()
+ * Log handler that replicates the behavior of MediaWiki's former wfErrorLog()
* logging service. Log output can be directed to a local file, a PHP stream,
* or a udp2log server.
*