[Vtigercrm-commits] [vtiger-commits] r5363 - /vtigercrm/branches/4.2/vtigerlogger.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Apr 25 15:25:15 EDT 2006
Author: allanbush
Date: Tue Apr 25 13:25:13 2006
New Revision: 5363
Log:
Only create the logging object once and reuse it everytime as suggested by mikecrowe (http://forums.vtiger.com/viewtopic.php?t=3804).
I measured an approximate half second page loading time improvement on my system (3.5 -> 3 seconds to load the home tab) with this change.
Modified:
vtigercrm/branches/4.2/vtigerlogger.php
Modified: vtigercrm/branches/4.2/vtigerlogger.php
==============================================================================
--- vtigercrm/branches/4.2/vtigerlogger.php (original)
+++ vtigercrm/branches/4.2/vtigerlogger.php Tue Apr 25 13:25:13 2006
@@ -11,17 +11,17 @@
class vtigerLogger {
var $debug_status;
+ var $log1;
function logthis($msg,$loglevel) {
if($this->debug_status) {
require_once('include/logging.php');
- $log1 =& LoggerManager::getLogger('VT');
if(is_array($msg))
- $log1->$loglevel("Message".print_r($msg,true));
+ $this->log1->$loglevel("Message".print_r($msg,true));
else
- $log1->$loglevel("Message ->".$msg);
+ $this->log1->$loglevel("Message ->".$msg);
return $msg;
}
@@ -29,6 +29,7 @@
function vtigerLogger() {
$this->debug_status= true;
+ $this->log1 =& LoggerManager::getLogger('VT');
}
}
More information about the vtigercrm-commits
mailing list