Hashar has uploaded a new change for review.

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


Change subject: SquidUpdate debug message are now in 'squid' group
......................................................................

SquidUpdate debug message are now in 'squid' group

To debug purging issues in beta, it would be useful to have all squid
related messages grouped at the same place.  wfDebug() is logged on beta
but it has a good amount of spam which is not that useful.  Regrouping
all squid operations under the debug log group 'squid' will make it
easier to investigate.

Change-Id: I11112585f38307ae56ec3e05e7a8d6d9dab31bfa
---
M includes/cache/SquidUpdate.php
1 file changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/71342/1

diff --git a/includes/cache/SquidUpdate.php b/includes/cache/SquidUpdate.php
index dd71801..0ee41e5 100644
--- a/includes/cache/SquidUpdate.php
+++ b/includes/cache/SquidUpdate.php
@@ -129,7 +129,7 @@
                        return;
                }
 
-               wfDebug( "Squid purge: " . implode( ' ', $urlArr ) . "\n" );
+               wfDebugLog( 'squid', __METHOD__ . ': ' . implode( ' ', $urlArr 
) . "\n" );
 
                if ( $wgHTCPMulticastRouting ) {
                        SquidUpdate::HTCPPurge( $urlArr );
@@ -197,7 +197,8 @@
                                $url = SquidUpdate::expand( $url );
                                $conf = self::getRuleForURL( $url, 
$wgHTCPMulticastRouting );
                                if ( !$conf ) {
-                                       wfDebug( "No HTCP rule configured for 
URL $url , skipping\n" );
+                                       wfDebugLog( 'squid', __METHOD__ .
+                                               "No HTCP rule configured for 
URL $url , skipping\n" );
                                        continue;
                                }
                                if ( !isset( $conf['host'] ) || !isset( 
$conf['port'] ) ) {
@@ -225,13 +226,15 @@
                                        $htcpTransID, $htcpSpecifier, 2 );
 
                                // Send out
-                               wfDebug( "Purging URL $url via HTCP\n" );
+                               wfDebugLog( 'squid', __METHOD__ .
+                                       "Purging URL $url via HTCP\n" );
                                socket_sendto( $conn, $htcpPacket, $htcpLen, 0,
                                        $conf['host'], $conf['port'] );
                        }
                } else {
                        $errstr = socket_strerror( socket_last_error() );
-                       wfDebug( __METHOD__ . "(): Error opening UDP socket: 
$errstr\n" );
+                       wfDebugLog( 'squid', __METHOD__ .
+                               ": Error opening UDP socket: $errstr\n" );
                }
                wfProfileOut( __METHOD__ );
        }

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

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

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

Reply via email to