Switch empty username logging from warning to debug.
authorBill Pirkle <bpirkle@wikimedia.org>
Sat, 25 May 2019 02:14:42 +0000 (21:14 -0500)
committerBill Pirkle <bpirkle@wikimedia.org>
Sat, 25 May 2019 02:14:42 +0000 (21:14 -0500)
Change ddd1d4b9203a added logging when an empty username is
passed to various Linker.php functions. The logging revealed
this occuring on live, but it is occuring frequently and
causing distracting log noise. Switch the logging type from
warning to debug while the root cause is investigated.

Bug: T224050
Change-Id: I93826e486951e992afdf778f446792d3c209996a

includes/Linker.php

index 4d684b5..3f50c97 100644 (file)
@@ -895,7 +895,7 @@ class Linker {
         */
        public static function userLink( $userId, $userName, $altUserName = false ) {
                if ( $userName === '' ) {
-                       wfLogWarning( __METHOD__ . ' received an empty username. Are there database errors ' .
+                       wfDebug( __METHOD__ . ' received an empty username. Are there database errors ' .
                                'that need to be fixed?' );
                        return wfMessage( 'empty-username' )->parse();
                }
@@ -943,7 +943,7 @@ class Linker {
                $useParentheses = true
        ) {
                if ( $userText === '' ) {
-                       wfLogWarning( __METHOD__ . ' received an empty username. Are there database errors ' .
+                       wfDebug( __METHOD__ . ' received an empty username. Are there database errors ' .
                                'that need to be fixed?' );
                        return ' ' . wfMessage( 'empty-username' )->parse();
                }
@@ -1031,7 +1031,7 @@ class Linker {
         */
        public static function userTalkLink( $userId, $userText ) {
                if ( $userText === '' ) {
-                       wfLogWarning( __METHOD__ . ' received an empty username. Are there database errors ' .
+                       wfDebug( __METHOD__ . ' received an empty username. Are there database errors ' .
                                'that need to be fixed?' );
                        return wfMessage( 'empty-username' )->parse();
                }
@@ -1053,7 +1053,7 @@ class Linker {
         */
        public static function blockLink( $userId, $userText ) {
                if ( $userText === '' ) {
-                       wfLogWarning( __METHOD__ . ' received an empty username. Are there database errors ' .
+                       wfDebug( __METHOD__ . ' received an empty username. Are there database errors ' .
                                'that need to be fixed?' );
                        return wfMessage( 'empty-username' )->parse();
                }