summaryrefslogtreecommitdiff
path: root/framework/Util
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Util')
-rw-r--r--framework/Util/TLogRouter.php29
1 files changed, 26 insertions, 3 deletions
diff --git a/framework/Util/TLogRouter.php b/framework/Util/TLogRouter.php
index 79035a7a..b7b2f0a3 100644
--- a/framework/Util/TLogRouter.php
+++ b/framework/Util/TLogRouter.php
@@ -1004,6 +1004,13 @@ EOD;
*/
class TFirePhpLogRoute extends TLogRoute
{
+ /**
+ * Default group label
+ */
+ const DEFAULT_LABEL = 'System.Util.TLogRouter(TFirePhpLogRoute)';
+
+ private $_groupLabel = null;
+
public function processLogs($logs)
{
if(empty($logs) || $this->getApplication()->getMode()==='Performance') return;
@@ -1012,7 +1019,7 @@ class TFirePhpLogRoute extends TLogRoute
$firephp = FirePHP::getInstance(true);
$firephp -> setOptions(array('useNativeJsonEncode' => false));
- $firephp -> group('System.Util.TLogRouter(TFirePhpLogRoute)', array('Collapsed' => true));
+ $firephp -> group($this->getGroupLabel(), array('Collapsed' => true));
$firephp ->log('Time, Message');
@@ -1060,6 +1067,22 @@ class TFirePhpLogRoute extends TLogRoute
}
return FirePHP::LOG;
}
-}
-?>
+ /**
+ * @return string group label. Defaults to TFirePhpLogRoute::DEFAULT_LABEL
+ */
+ public function getGroupLabel()
+ {
+ if($this->_groupLabel===null)
+ $this->_groupLabel=self::DEFAULT_LABEL;
+ return $this->_groupLabel;
+ }
+
+ /**
+ * @param string group label.
+ */
+ public function setGroupLabel($value)
+ {
+ $this->_groupLabel=$value;
+ }
+} \ No newline at end of file