[pLog-svn] r6073 - plog/trunk/class/logger/config

mark at devel.lifetype.net mark at devel.lifetype.net
Thu Nov 22 08:59:43 EST 2007


Author: mark
Date: 2007-11-22 08:59:43 -0500 (Thu, 22 Nov 2007)
New Revision: 6073

Modified:
   plog/trunk/class/logger/config/loggerconfigloader.class.php
Log:
We can not use the global here to fix the syntax error.

Modified: plog/trunk/class/logger/config/loggerconfigloader.class.php
===================================================================
--- plog/trunk/class/logger/config/loggerconfigloader.class.php	2007-11-22 08:56:21 UTC (rev 6072)
+++ plog/trunk/class/logger/config/loggerconfigloader.class.php	2007-11-22 13:59:43 UTC (rev 6073)
@@ -1,9 +1,9 @@
 <?php
 
 	define( "LOGGER_DEFAULT_CONFIG_FILE_PATH", PLOG_CLASS_PATH."config/logging.properties.php" );
-	
-	
 
+
+
 	/**
 	 * loads the config file of the logger. By default it uses config/logging.properties.php
 	 * as the config file. See the documentation for the LoggerManager for more details on how
@@ -13,17 +13,17 @@
 	 */
 	class LoggerConfigLoader
 	{
-	
+
 		/**
 		 * array used to store the keys
 		 */
 		var $_keys;
-	
+
 		function LoggerConfigLoader( $defaultFilePath = LOGGER_DEFAULT_CONFIG_FILE_PATH )
 		{
 			// load the config file if it is readable
 			if( File::isReadable( $defaultFilePath )) {
-				global $config;
+				$config = array();
 				include( $defaultFilePath );
 				$this->_keys = $config;
 			}
@@ -32,7 +32,7 @@
 				die();
 			}
 		}
-		
+
 		/**
 		 * @param key
 		 * @return Returns the value assigned to the given key
@@ -41,7 +41,7 @@
 		{
 			return( $this->_keys[$key] );
 		}
-		
+
 		/**
 		 * returns a list of all the configured loggers
 		 *
@@ -50,12 +50,12 @@
 		 */
 		function getConfiguredLoggers()
 		{
-			if( is_array( $this->_keys )) 
+			if( is_array( $this->_keys ))
 				return( array_keys( $this->_keys ));
 			else
 				return( Array());
 		}
-		
+
 		/**
 		 * returns all the properties given a logger
 		 *
@@ -66,7 +66,7 @@
 		{
 			return( $this->getValue( $logger ));
 		}
-		
+
 		/**
 		 * returns the default layout for a given logger
 		 *
@@ -77,7 +77,7 @@
 		{
 			return( $this->getLoggerProperty( $logger, "layout" ));
 		}
-		
+
 		/**
 		 * returns the filename where the given logger is going to write its messages
 		 *
@@ -88,7 +88,7 @@
 		{
 			return( $this->getLoggerProperty( $logger, "file" ));
 		}
-		
+
 		/**
 		 * returns the appender used by the given logger
 		 *
@@ -99,7 +99,7 @@
 		{
 			return( $this->getLoggerProperty( $logger, "appender" ));
 		}
-		
+
 		/**
 		 * returns all properties of a given logger
 		 *
@@ -111,8 +111,8 @@
 		function getLoggerProperty( $logger, $property )
 		{
 			$loggerProperties = $this->getLoggerProperties( $logger );
-			
-			return( $loggerProperties[$property] );		
+
+			return( $loggerProperties[$property] );
 		}
 	}
 ?>
\ No newline at end of file



More information about the pLog-svn mailing list