BryanDavis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/180048

Change subject: Deprecate wfErrorLog
......................................................................

Deprecate wfErrorLog

When a logging service other than MWLoggerLegacySpi is used, the
behavior of wfErrorLog is not guaranteed.

Change-Id: I8543bfd556aa752665f7a3daa855d3c2f7fc8956
---
M api.php
M includes/GlobalFunctions.php
M maintenance/storage/recompressTracked.php
3 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/48/180048/1

diff --git a/api.php b/api.php
index cc589b0..92e6704 100644
--- a/api.php
+++ b/api.php
@@ -122,7 +122,7 @@
        } else {
                $items[] = "failed in ApiBeforeMain";
        }
-       wfErrorLog( implode( ',', $items ) . "\n", $wgAPIRequestLog );
+       MWLoggerLegacyLogger::emit( implode( ',', $items ) . "\n", 
$wgAPIRequestLog );
        wfDebug( "Logged API request to $wgAPIRequestLog\n" );
 }
 
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 859b421..1dd6dc4 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1177,8 +1177,10 @@
  * @param string $file Filename
  * @param array $context Additional logging context data
  * @throws MWException
+ * @deprecated since 1.25 Use MWLoggerLegacyLogger::emit or UDPTransport
  */
 function wfErrorLog( $text, $file, array $context = array() ) {
+       wfDeprecated( __METHOD__, '1.25' );
        $logger = MWLogger::getInstance( 'wfErrorLog' );
        $context['destination'] = $file;
        $logger->info( trim( $text ), $context );
diff --git a/maintenance/storage/recompressTracked.php 
b/maintenance/storage/recompressTracked.php
index 45cc339..eb7eca1 100644
--- a/maintenance/storage/recompressTracked.php
+++ b/maintenance/storage/recompressTracked.php
@@ -141,7 +141,7 @@
                        $header .= "({$this->slaveId})";
                }
                $header .= ' ' . wfWikiID();
-               wfErrorLog( sprintf( "%-50s %s\n", $header, $msg ), $file );
+               MWLoggerLegacyLogger::emit( sprintf( "%-50s %s\n", $header, 
$msg ), $file );
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/180048
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8543bfd556aa752665f7a3daa855d3c2f7fc8956
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to