From e4587335b8c79bc2dc726da4f39ef43a0034247f Mon Sep 17 00:00:00 2001 From: "godzilla80@gmx.net" <> Date: Sat, 23 May 2009 06:12:08 +0000 Subject: add GroupLabel property to TFirePhpLogRoute --- framework/Util/TLogRouter.php | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'framework/Util') 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 -- cgit v1.2.3