summaryrefslogtreecommitdiff
path: root/framework/PradoBase.php
diff options
context:
space:
mode:
authorjavalizard <>2010-04-18 06:58:16 +0000
committerjavalizard <>2010-04-18 06:58:16 +0000
commit678f2a9c708ee0c61589817fde3a77ac4c199d3a (patch)
tree5d6e4d2126954e667ebd9626fd041c91562ac4e6 /framework/PradoBase.php
parenta55ec97650341930cd5fee6f1fd2831d7ccca358 (diff)
adds the control parameter for logging and tracing. Adds a log when logs don't init properly. This outputs converts the xml into into text entities. The TDbLogRoute now also captures the control ids as well.
Diffstat (limited to 'framework/PradoBase.php')
-rw-r--r--framework/PradoBase.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/framework/PradoBase.php b/framework/PradoBase.php
index 1819b72f..95ea7e23 100644
--- a/framework/PradoBase.php
+++ b/framework/PradoBase.php
@@ -517,9 +517,10 @@ class PradoBase
* Otherwise, the message is logged at INFO level.
* @param string message to be logged
* @param string category of the message
+ * @param (string|TControl) control of the message
* @see log, getLogger
*/
- public static function trace($msg,$category='Uncategorized')
+ public static function trace($msg,$category='Uncategorized',$ctl=null)
{
if(self::$_application && self::$_application->getMode()===TApplicationMode::Performance)
return;
@@ -532,7 +533,7 @@ class PradoBase
}
else
$level=TLogger::INFO;
- self::log($msg,$level,$category);
+ self::log($msg,$level,$category,$ctl);
}
/**
@@ -545,12 +546,13 @@ class PradoBase
* TLogger::DEBUG, TLogger::INFO, TLogger::NOTICE, TLogger::WARNING,
* TLogger::ERROR, TLogger::ALERT, TLogger::FATAL.
* @param string category of the message
+ * @param (string|TControl) control of the message
*/
- public static function log($msg,$level=TLogger::INFO,$category='Uncategorized')
+ public static function log($msg,$level=TLogger::INFO,$category='Uncategorized',$ctl=null)
{
if(self::$_logger===null)
self::$_logger=new TLogger;
- self::$_logger->log($msg,$level,$category);
+ self::$_logger->log($msg,$level,$category,$ctl);
}
/**