summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgodzilla80@gmx.net <>2009-05-23 06:12:08 +0000
committergodzilla80@gmx.net <>2009-05-23 06:12:08 +0000
commite4587335b8c79bc2dc726da4f39ef43a0034247f (patch)
tree19bfa6346ddab5d6cb3e3e50561de5fc6600cc43
parenta0b494e3887875b2f5cf235ca0214a317b353e81 (diff)
add GroupLabel property to TFirePhpLogRoute
-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