From 678f2a9c708ee0c61589817fde3a77ac4c199d3a Mon Sep 17 00:00:00 2001 From: javalizard <> Date: Sun, 18 Apr 2010 06:58:16 +0000 Subject: 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. --- framework/PradoBase.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'framework/PradoBase.php') 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); } /** -- cgit v1.2.3