From: Aaron Schulz Date: Mon, 21 Apr 2014 17:37:14 +0000 (-0700) Subject: Include pool type in pool counter log entries X-Git-Tag: 1.31.0-rc.0~16098^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=87cdc965108ad3abce65eaf4528aaf5f1941c974;p=lhc%2Fweb%2Fwiklou.git Include pool type in pool counter log entries Change-Id: I1b0213b5af755208843cb2cd02d3446c480f6882 --- diff --git a/includes/poolcounter/PoolCounterWork.php b/includes/poolcounter/PoolCounterWork.php index 86bf8f12a9..523e9e0194 100644 --- a/includes/poolcounter/PoolCounterWork.php +++ b/includes/poolcounter/PoolCounterWork.php @@ -25,13 +25,17 @@ * Class for dealing with PoolCounters using class members */ abstract class PoolCounterWork { - protected $cacheable = false; //Does this override getCachedWork() ? + /** @var string */ + protected $type = 'generic'; + /** @var bool */ + protected $cacheable = false; // does this override getCachedWork() ? /** * @param string $type The type of PoolCounter to use * @param string $key Key that identifies the queue this work is placed on */ public function __construct( $type, $key ) { + $this->type = $type; $this->poolCounter = PoolCounter::factory( $type, $key ); } @@ -75,7 +79,7 @@ abstract class PoolCounterWork { public function logError( $status ) { $key = $this->poolCounter->getKey(); - wfDebugLog( 'poolcounter', "Pool key '$key': " + wfDebugLog( 'poolcounter', "Pool key '$key' ({$this->type}): " . $status->getMessage()->inLanguage( 'en' )->useDatabase( false )->text() ); }