From cf99ae3f28af4adf155e89cdedf6c8fc3158cf03 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 1 Jul 2013 15:16:43 +0200 Subject: [PATCH] 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 --- includes/cache/SquidUpdate.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/includes/cache/SquidUpdate.php b/includes/cache/SquidUpdate.php index dd7180173a..0ee41e52e7 100644 --- a/includes/cache/SquidUpdate.php +++ b/includes/cache/SquidUpdate.php @@ -129,7 +129,7 @@ class SquidUpdate { return; } - wfDebug( "Squid purge: " . implode( ' ', $urlArr ) . "\n" ); + wfDebugLog( 'squid', __METHOD__ . ': ' . implode( ' ', $urlArr ) . "\n" ); if ( $wgHTCPMulticastRouting ) { SquidUpdate::HTCPPurge( $urlArr ); @@ -197,7 +197,8 @@ class SquidUpdate { $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 @@ class SquidUpdate { $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__ ); } -- 2.20.1