Skip to content
Snippets Groups Projects
Commit 4825cd2b authored by Uma's avatar Uma
Browse files

log4php library upgraded version 2.1.0

parent f05955d8
No related branches found
No related tags found
No related merge requests found
......@@ -22,20 +22,20 @@ require_once('config.php');
// Performance Optimization: Configure the log folder
@include_once('config.performance.php');
global $PERFORMANCE_CONFIG;
define('LOG4PHP_DEFAULT_INIT_OVERRIDE', true);
if(isset($PERFORMANCE_CONFIG) && isset($PERFORMANCE_CONFIG['LOG4PHP_DEBUG']) && $PERFORMANCE_CONFIG['LOG4PHP_DEBUG']) {
define('LOG4PHP_DIR', 'libraries/log4php.debug');
require_once(LOG4PHP_DIR.'/Logger.php');
Logger::configure('log4php.properties');
} else {
define('LOG4PHP_DIR', 'libraries/log4php');
require_once(LOG4PHP_DIR.'/Logger.php');
require_once(LOG4PHP_DIR.'/LoggerPropertyConfigurator.php');
$config = new LoggerPropertyConfigurator();
$config->configure('log4php.properties');
}
// END
define('LOG4PHP_DEFAULT_INIT_OVERRIDE', true);
require_once(LOG4PHP_DIR.'/Logger.php');
//require_once(LOG4PHP_DIR.'/LoggerPropertyConfigurator.php');
//
//$config = new LoggerPropertyConfigurator();
//$config->configure('log4php.properties');
Logger::configure('log4php.properties');
?>
\ No newline at end of file
......@@ -10,13 +10,6 @@
/** Classes to avoid logging */
class LoggerManager {
static function getlogger($name = 'ROOT') {
$configinfo = LoggerPropertyConfigurator::getInstance()->getConfigInfo($name);
return new Logger($name, $configinfo);
}
}
/**
* Core logging class.
*/
......@@ -101,6 +94,11 @@ class Logger {
function isDebugEnabled() {
return $this->isLevelEnabled('DEBUG');
}
static function getlogger($name = 'ROOT') {
$configinfo = LoggerPropertyConfigurator::getInstance()->getConfigInfo($name);
return new Logger($name, $configinfo);
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment