logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject [21/43] LOG4PHP-121: Reorganized classes into namespaces
Date Thu, 28 Nov 2013 16:03:51 GMT
http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/LoggerHierarchy.php
----------------------------------------------------------------------
diff --git a/src/main/php/LoggerHierarchy.php b/src/main/php/LoggerHierarchy.php
deleted file mode 100644
index 55fe143..0000000
--- a/src/main/php/LoggerHierarchy.php
+++ /dev/null
@@ -1,257 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @package log4php
- */
-
-/**
- * This class is specialized in retrieving loggers by name and also maintaining 
- * the logger hierarchy. The logger hierarchy is dealing with the several Log-Levels
- * Logger can have. From log4j website:
- * 
- * "A logger is said to be an ancestor of another logger if its name followed 
- * by a dot is a prefix of the descendant logger name. A logger is said to be
- * a parent of a child logger if there are no ancestors between itself and the 
- * descendant logger."
- * 
- * Child Loggers do inherit their Log-Levels from their Ancestors. They can
- * increase their Log-Level compared to their Ancestors, but they cannot decrease it.
- * 
- * <p>The casual user does not have to deal with this class directly.</p>
- *
- * <p>The structure of the logger hierarchy is maintained by the
- * getLogger method. The hierarchy is such that children link
- * to their parent but parents do not have any pointers to their
- * children. Moreover, loggers can be instantiated in any order, in
- * particular descendant before ancestor.</p>
- *
- * <p>In case a descendant is created before a particular ancestor,
- * then it creates a provision node for the ancestor and adds itself
- * to the provision node. Other descendants of the same ancestor add
- * themselves to the previously created provision node.</p>
- *
- * @version $Revision$
- * @package log4php
- */
-class LoggerHierarchy {
-	
-	/** Array holding all Logger instances. */
-	protected $loggers = array();
-	
-	/** 
-	 * The root logger.
-	 * @var RootLogger 
-	 */
-	protected $root;
-	
-	/** 
-	 * The logger renderer map.
-	 * @var LoggerRendererMap 
-	 */
-	protected $rendererMap;
-
-	/** 
-	 * Main level threshold. Events with lower level will not be logged by any 
-	 * logger, regardless of it's configuration.
-	 * @var LoggerLevel 
-	 */
-	protected $threshold;
-	
-	/**
-	 * Creates a new logger hierarchy.
-	 * @param LoggerRoot $root The root logger.
-	 */
-	public function __construct(LoggerRoot $root) {
-		$this->root = $root;
-		$this->setThreshold(LoggerLevel::getLevelAll());
-		$this->rendererMap = new LoggerRendererMap();
-	}
-	 
-	/**
-	 * Clears all loggers.
-	 */
-	public function clear() {
-		$this->loggers = array();
-	}
-	
-	/**
-	 * Check if the named logger exists in the hierarchy.
-	 * @param string $name
-	 * @return boolean
-	 */
-	public function exists($name) {
-		return isset($this->loggers[$name]);
-	}
-
-	/**
-	 * Returns all the currently defined loggers in this hierarchy as an array.
-	 * @return array
-	 */	 
-	public function getCurrentLoggers() {
-		return array_values($this->loggers);
-	}
-	
-	/**
-	 * Returns a named logger instance logger. If it doesn't exist, one is created.
-	 * 
-	 * @param string $name Logger name
-	 * @return Logger Logger instance.
-	 */
-	public function getLogger($name) {
-		if(!isset($this->loggers[$name])) {
-			$logger = new Logger($name);
-
-			$nodes = explode('.', $name);
-			$firstNode = array_shift($nodes);
-			
-			// if name is not a first node but another first node is their
-			if($firstNode != $name and isset($this->loggers[$firstNode])) {
-				$logger->setParent($this->loggers[$firstNode]);
-			} else {
-				// if there is no father, set root logger as father
-				$logger->setParent($this->root);
-			} 
-		
-			// if there are more nodes than one
-			if(count($nodes) > 0) {
-				// find parent node
-				foreach($nodes as $node) {
-					$parentNode = "$firstNode.$node";
-					if(isset($this->loggers[$parentNode]) and $parentNode != $name) {
-						$logger->setParent($this->loggers[$parentNode]);
-					}
-					$firstNode .= ".$node";
-				}
-			}
-			
-			$this->loggers[$name] = $logger;
-		}		
-		
-		return $this->loggers[$name];
-	} 
-	
-	/**
-	 * Returns the logger renderer map.
-	 * @return LoggerRendererMap 
-	 */
-	public function getRendererMap() {
-		return $this->rendererMap;
-	}
-	
-	/**
-	 * Returns the root logger.
-	 * @return LoggerRoot
-	 */ 
-	public function getRootLogger() {
-		return $this->root;
-	}
-	 
-	/**
-	 * Returns the main threshold level.
-	 * @return LoggerLevel 
-	 */
-	public function getThreshold() {
-		return $this->threshold;
-	} 
-
-	/**
-	 * Returns true if the hierarchy is disabled for given log level and false
-	 * otherwise.
-	 * @return boolean
-	 */
-	public function isDisabled(LoggerLevel $level) {
-		return ($this->threshold->toInt() > $level->toInt());
-	}
-	
-	/**
-	 * Reset all values contained in this hierarchy instance to their
-	 * default. 
-	 *
-	 * This removes all appenders from all loggers, sets
-	 * the level of all non-root loggers to <i>null</i>,
-	 * sets their additivity flag to <i>true</i> and sets the level
-	 * of the root logger to {@link LOGGER_LEVEL_DEBUG}.
-	 * 
-	 * <p>Existing loggers are not removed. They are just reset.
-	 *
-	 * <p>This method should be used sparingly and with care as it will
-	 * block all logging until it is completed.</p>
-	 */
-	public function resetConfiguration() {
-		$root = $this->getRootLogger();
-		
-		$root->setLevel(LoggerLevel::getLevelDebug());
-		$this->setThreshold(LoggerLevel::getLevelAll());
-		$this->shutDown();
-		
-		foreach($this->loggers as $logger) {
-			$logger->setLevel(null);
-			$logger->setAdditivity(true);
-			$logger->removeAllAppenders();
-		}
-		
-		$this->rendererMap->reset();
-		LoggerAppenderPool::clear();
-	}
-	
-	/**
-	 * Sets the main threshold level.
-	 * @param LoggerLevel $l
-	 */
-	public function setThreshold(LoggerLevel $threshold) {
-		$this->threshold = $threshold;
-	}
-	
-	/**
-	 * Shutting down a hierarchy will <i>safely</i> close and remove
-	 * all appenders in all loggers including the root logger.
-	 * 
-	 * The shutdown method is careful to close nested
-	 * appenders before closing regular appenders. This is allows
-	 * configurations where a regular appender is attached to a logger
-	 * and again to a nested appender.
-	 * 
-	 * @todo Check if the last paragraph is correct.
-	 */
-	public function shutdown() {
-		$this->root->removeAllAppenders();
-		
-		foreach($this->loggers as $logger) {
-			$logger->removeAllAppenders();
-		}
-	}
-	
-	/**
-	 * Prints the current Logger hierarchy tree. Useful for debugging.
-	 */
-	public function printHierarchy() {
-		$this->printHierarchyInner($this->getRootLogger(), 0);
-	}
-	
-	private function printHierarchyInner(Logger $current, $level) {
-		for ($i = 0; $i < $level; $i++) {
-			echo ($i == $level - 1) ? "|--" : "|  ";
-		}
-		echo $current->getName() . "\n";
-		
-		foreach($this->loggers as $logger) {
-			if ($logger->getParent() == $current) {
-				$this->printHierarchyInner($logger, $level + 1);
-			}
-		}
-	}
-} 

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/LoggerLayout.php
----------------------------------------------------------------------
diff --git a/src/main/php/LoggerLayout.php b/src/main/php/LoggerLayout.php
deleted file mode 100644
index dd10820..0000000
--- a/src/main/php/LoggerLayout.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @package log4php
- */
-
-/**
- * Extend this abstract class to create your own log layout format.
- *	
- * @version $Revision$
- * @package log4php
- */
-abstract class LoggerLayout extends LoggerConfigurable {
-	/**
-	 * Activates options for this layout.
-	 * Override this method if you have options to be activated.
-	 */
-	public function activateOptions() {
-		return true;
-	}
-
-	/**
-	 * Override this method to create your own layout format.
-	 *
-	 * @param LoggerLoggingEvent
-	 * @return string
-	 */
-	public function format(LoggerLoggingEvent $event) {
-		return $event->getRenderedMessage();
-	} 
-	
-	/**
-	 * Returns the content type output by this layout.
-	 * @return string
-	 */
-	public function getContentType() {
-		return "text/plain";
-	} 
-			
-	/**
-	 * Returns the footer for the layout format.
-	 * @return string
-	 */
-	public function getFooter() {
-		return null;
-	} 
-
-	/**
-	 * Returns the header for the layout format.
-	 * @return string
-	 */
-	public function getHeader() {
-		return null;
-	}
-	
-	/** Triggers a warning for this layout with the given message. */
-	protected function warn($message) {
-		trigger_error("log4php: [" . get_class($this) . "]: $message", E_USER_WARNING);
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/LoggerLevel.php
----------------------------------------------------------------------
diff --git a/src/main/php/LoggerLevel.php b/src/main/php/LoggerLevel.php
deleted file mode 100644
index bcab6b0..0000000
--- a/src/main/php/LoggerLevel.php
+++ /dev/null
@@ -1,256 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @package log4php
- */
-
-/**
- * Defines the minimum set of levels recognized by the system, that is
- * <i>OFF</i>, <i>FATAL</i>, <i>ERROR</i>,
- * <i>WARN</i>, <i>INFO</i>, <i>DEBUG</i> and
- * <i>ALL</i>.
- *
- * <p>The <i>LoggerLevel</i> class may be subclassed to define a larger
- * level set.</p>
- *
- * @version $Revision$
- * @package log4php
- * @since 0.5
- */
-class LoggerLevel {
-	
-	const OFF = 2147483647;
-	const FATAL = 50000;
-	const ERROR = 40000;
-	const WARN = 30000;
-	const INFO = 20000;
-	const DEBUG = 10000;
-	const TRACE = 5000;
-	const ALL = -2147483647;
-
-	/** Integer level value. */
-	private $level;
-	
-	/** Contains a list of instantiated levels. */
-	private static $levelMap;
-
-	/** String representation of the level. */
-	private $levelStr;
-
-	/** 
-	 * Equivalent syslog level.
-	 * @var integer
-	 */
-	private $syslogEquivalent;
-
-	/**
-	 * Constructor
-	 *
-	 * @param integer $level
-	 * @param string $levelStr
-	 * @param integer $syslogEquivalent
-	 */
-	private function __construct($level, $levelStr, $syslogEquivalent) {
-		$this->level = $level;
-		$this->levelStr = $levelStr;
-		$this->syslogEquivalent = $syslogEquivalent;
-	}
-
-	/**
-	 * Compares two logger levels.
-	 *
-	 * @param LoggerLevels $other
-	 * @return boolean 
-	 */
-	public function equals($other) {
-		if($other instanceof LoggerLevel) {
-			if($this->level == $other->level) {
-				return true;
-			}
-		} else {
-			return false;
-		}
-	}
-	
-	/**
-	 * Returns an Off Level
-	 * @return LoggerLevel
-	 */
-	public static function getLevelOff() {
-		if(!isset(self::$levelMap[LoggerLevel::OFF])) {
-			self::$levelMap[LoggerLevel::OFF] = new LoggerLevel(LoggerLevel::OFF, 'OFF', LOG_ALERT);
-		}
-		return self::$levelMap[LoggerLevel::OFF];
-	}
-
-	/**
-	 * Returns a Fatal Level
-	 * @return LoggerLevel
-	 */
-	public static function getLevelFatal() {
-		if(!isset(self::$levelMap[LoggerLevel::FATAL])) {
-			self::$levelMap[LoggerLevel::FATAL] = new LoggerLevel(LoggerLevel::FATAL, 'FATAL', LOG_ALERT);
-		}
-		return self::$levelMap[LoggerLevel::FATAL];
-	}
-	
-	/**
-	 * Returns an Error Level
-	 * @return LoggerLevel
-	 */
-	public static function getLevelError() {
-		if(!isset(self::$levelMap[LoggerLevel::ERROR])) {
-			self::$levelMap[LoggerLevel::ERROR] = new LoggerLevel(LoggerLevel::ERROR, 'ERROR', LOG_ERR);
-		}
-		return self::$levelMap[LoggerLevel::ERROR];
-	}
-	
-	/**
-	 * Returns a Warn Level
-	 * @return LoggerLevel
-	 */
-	public static function getLevelWarn() {
-		if(!isset(self::$levelMap[LoggerLevel::WARN])) {
-			self::$levelMap[LoggerLevel::WARN] = new LoggerLevel(LoggerLevel::WARN, 'WARN', LOG_WARNING);
-		}
-		return self::$levelMap[LoggerLevel::WARN];
-	}
-
-	/**
-	 * Returns an Info Level
-	 * @return LoggerLevel
-	 */
-	public static function getLevelInfo() {
-		if(!isset(self::$levelMap[LoggerLevel::INFO])) {
-			self::$levelMap[LoggerLevel::INFO] = new LoggerLevel(LoggerLevel::INFO, 'INFO', LOG_INFO);
-		}
-		return self::$levelMap[LoggerLevel::INFO];
-	}
-
-	/**
-	 * Returns a Debug Level
-	 * @return LoggerLevel
-	 */
-	public static function getLevelDebug() {
-		if(!isset(self::$levelMap[LoggerLevel::DEBUG])) {
-			self::$levelMap[LoggerLevel::DEBUG] = new LoggerLevel(LoggerLevel::DEBUG, 'DEBUG', LOG_DEBUG);
-		}
-		return self::$levelMap[LoggerLevel::DEBUG];
-	}
-	
-	/**
-	 * Returns a Trace Level
-	 * @return LoggerLevel
-	 */
-	public static function getLevelTrace() {
-		if(!isset(self::$levelMap[LoggerLevel::TRACE])) {
-			self::$levelMap[LoggerLevel::TRACE] = new LoggerLevel(LoggerLevel::TRACE, 'TRACE', LOG_DEBUG);
-		}
-		return self::$levelMap[LoggerLevel::TRACE];
-	}	
-
-	/**
-	 * Returns an All Level
-	 * @return LoggerLevel
-	 */
-	public static function getLevelAll() {
-		if(!isset(self::$levelMap[LoggerLevel::ALL])) {
-			self::$levelMap[LoggerLevel::ALL] = new LoggerLevel(LoggerLevel::ALL, 'ALL', LOG_DEBUG);
-		}
-		return self::$levelMap[LoggerLevel::ALL];
-	}
-	
-	/**
-	 * Return the syslog equivalent of this level as an integer.
-	 * @return integer
-	 */
-	public function getSyslogEquivalent() {
-		return $this->syslogEquivalent;
-	}
-
-	/**
-	 * Returns <i>true</i> if this level has a higher or equal
-	 * level than the level passed as argument, <i>false</i>
-	 * otherwise.
-	 *
-	 * @param LoggerLevel $other
-	 * @return boolean
-	 */
-	public function isGreaterOrEqual($other) {
-		return $this->level >= $other->level;
-	}
-
-	/**
-	 * Returns the string representation of this level.
-	 * @return string
-	 */
-	public function toString() {
-		return $this->levelStr;
-	}
-	
-	/**
-	 * Returns the string representation of this level.
-	 * @return string
-	 */
-	public function __toString() {
-		return $this->toString();
-	}
-
-	/**
-	 * Returns the integer representation of this level.
-	 * @return integer
-	 */
-	public function toInt() {
-		return $this->level;
-	}
-
-	/**
-	 * Convert the input argument to a level. If the conversion fails, then 
-	 * this method returns the provided default level.
-	 *
-	 * @param mixed $arg The value to convert to level.
-	 * @param LoggerLevel $default Value to return if conversion is not possible.
-	 * @return LoggerLevel 
-	 */
-	public static function toLevel($arg, $defaultLevel = null) {
-		if(is_int($arg)) {
-			switch($arg) {
-				case self::ALL:	return self::getLevelAll();
-				case self::TRACE: return self::getLevelTrace();
-				case self::DEBUG: return self::getLevelDebug();
-				case self::INFO: return self::getLevelInfo();
-				case self::WARN: return self::getLevelWarn();
-				case self::ERROR: return self::getLevelError();
-				case self::FATAL: return self::getLevelFatal();
-				case self::OFF:	return self::getLevelOff();
-				default: return $defaultLevel;
-			}
-		} else {
-			switch(strtoupper($arg)) {
-				case 'ALL':	return self::getLevelAll();
-				case 'TRACE': return self::getLevelTrace();
-				case 'DEBUG': return self::getLevelDebug();
-				case 'INFO': return self::getLevelInfo();
-				case 'WARN': return self::getLevelWarn();
-				case 'ERROR': return self::getLevelError();
-				case 'FATAL': return self::getLevelFatal();
-				case 'OFF':	return self::getLevelOff();
-				default: return $defaultLevel;
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/LoggerLocationInfo.php
----------------------------------------------------------------------
diff --git a/src/main/php/LoggerLocationInfo.php b/src/main/php/LoggerLocationInfo.php
deleted file mode 100644
index 2ef7f75..0000000
--- a/src/main/php/LoggerLocationInfo.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @package log4php
- */
-
-/**
- * The internal representation of caller location information.
- *
- * @version $Revision$
- * @package log4php
- * @since 0.3
- */
-class LoggerLocationInfo {
-	
-	/** The value to return when the location information is not available. */
-	const LOCATION_INFO_NA = 'NA';
-	
-	/**
-	 * Caller line number.
-	 * @var integer 
-	 */
-	protected $lineNumber;
-	
-	/**
-	 * Caller file name.
-	 * @var string 
-	 */
-	protected $fileName;
-	
-	/**
-	 * Caller class name.
-	 * @var string 
-	 */
-	protected $className;
-	
-	/**
-	 * Caller method name.
-	 * @var string 
-	 */
-	protected $methodName;
-	
-	/**
-	 * All the information combined.
-	 * @var string 
-	 */
-	protected $fullInfo;
-
-	/**
-	 * Instantiate location information based on a {@link PHP_MANUAL#debug_backtrace}.
-	 *
-	 * @param array $trace
-	 * @param mixed $caller
-	 */
-	public function __construct($trace, $fqcn = null) {
-		$this->lineNumber = isset($trace['line']) ? $trace['line'] : null;
-		$this->fileName = isset($trace['file']) ? $trace['file'] : null;
-		$this->className = isset($trace['class']) ? $trace['class'] : null;
-		$this->methodName = isset($trace['function']) ? $trace['function'] : null;
-		$this->fullInfo = $this->getClassName() . '.' . $this->getMethodName() . 
-			'(' . $this->getFileName() . ':' . $this->getLineNumber() . ')';
-	}
-
-	/** Returns the caller class name. */
-	public function getClassName() {
-		return ($this->className === null) ? self::LOCATION_INFO_NA : $this->className; 
-	}
-
-	/** Returns the caller file name. */
-	public function getFileName() {
-		return ($this->fileName === null) ? self::LOCATION_INFO_NA : $this->fileName; 
-	}
-
-	/** Returns the caller line number. */
-	public function getLineNumber() {
-		return ($this->lineNumber === null) ? self::LOCATION_INFO_NA : $this->lineNumber; 
-	}
-
-	/** Returns the caller method name. */
-	public function getMethodName() {
-		return ($this->methodName === null) ? self::LOCATION_INFO_NA : $this->methodName; 
-	}
-
-	/** Returns the full information of the caller. */
-	public function getFullInfo() {
-		return ($this->fullInfo === null) ? self::LOCATION_INFO_NA : $this->fullInfo;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/LoggerLoggingEvent.php
----------------------------------------------------------------------
diff --git a/src/main/php/LoggerLoggingEvent.php b/src/main/php/LoggerLoggingEvent.php
deleted file mode 100644
index 29ba361..0000000
--- a/src/main/php/LoggerLoggingEvent.php
+++ /dev/null
@@ -1,368 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @package log4php
- */
-
-/**
- * The internal representation of logging event.
- *
- * @version $Revision$
- * @package log4php
- */
-class LoggerLoggingEvent {
-
-	private static $startTime;
-
-	/** 
-	* @var string Fully Qualified Class Name of the calling category class.
-	*/
-	private $fqcn;
-	
-	/**
-	* @var Logger reference
-	*/
-	private $logger;
-	
-	/** 
-	 * The category (logger) name.
-	 * This field will be marked as private in future
-	 * releases. Please do not access it directly. 
-	 * Use the {@link getLoggerName()} method instead.
-	 * @deprecated 
-	 */
-	private $categoryName;
-	
-	/** 
-	 * Level of the logging event.
-	 * @var LoggerLevel
-	 */
-	protected $level;
-	
-	/** 
-	 * The nested diagnostic context (NDC) of logging event.
-	 * @var string  
-	 */
-	private $ndc;
-	
-	/** 
-	 * Have we tried to do an NDC lookup? If we did, there is no need
-	 * to do it again.	Note that its value is always false when
-	 * serialized. Thus, a receiving SocketNode will never use it's own
-	 * (incorrect) NDC. See also writeObject method.
-	 * @var boolean
-	 */
-	private $ndcLookupRequired = true;
-	
-	/** 
-	 * @var mixed The application supplied message of logging event. 
-	 */
-	private $message;
-	
-	/** 
-	 * The application supplied message rendered through the log4php
-	 * objet rendering mechanism. At present renderedMessage == message.
-	 * @var string
-	 */
-	private $renderedMessage;
-	
-	/** 
-	 * The name of thread in which this logging event was generated.
-	 * log4php saves here the process id via {@link PHP_MANUAL#getmypid getmypid()} 
-	 * @var mixed
-	 */
-	private $threadName;
-	
-	/** 
-	* The number of seconds elapsed from 1/1/1970 until logging event
-	* was created plus microseconds if available.
-	* @var float
-	*/
-	public $timeStamp;
-	
-	/** 
-	* @var LoggerLocationInfo Location information for the caller. 
-	*/
-	private $locationInfo;
-	
-	/**
-	 * @var LoggerThrowableInformation log4php internal representation of throwable
-	 */
-	private $throwableInfo;
-	
-	/**
-	* Instantiate a LoggingEvent from the supplied parameters.
-	*
-	* Except {@link $timeStamp} all the other fields of
-	* LoggerLoggingEvent are filled when actually needed.
-	*
-	* @param string $fqcn name of the caller class.
-	* @param mixed $logger The {@link Logger} category of this event or the logger name.
-	* @param LoggerLevel $level The level of this event.
-	* @param mixed $message The message of this event.
-	* @param integer $timeStamp the timestamp of this logging event.
-	* @param Exception $throwable The throwable associated with logging event
-	*/
-	public function __construct($fqcn, $logger, LoggerLevel $level, $message, $timeStamp = null, $throwable = null) {
-		$this->fqcn = $fqcn;
-		if($logger instanceof Logger) {
-			$this->logger = $logger;
-			$this->categoryName = $logger->getName();
-		} else {
-			$this->categoryName = strval($logger);
-		}
-		$this->level = $level;
-		$this->message = $message;
-		if($timeStamp !== null && is_numeric($timeStamp)) {
-			$this->timeStamp = $timeStamp;
-		} else {
-			$this->timeStamp = microtime(true);
-		}
-		
-		if ($throwable !== null && $throwable instanceof Exception) {
-			$this->throwableInfo = new LoggerThrowableInformation($throwable);
-		}
-	}
-
-	/**
-	 * Returns the full qualified classname.
-	 * TODO: PHP does contain namespaces in 5.3. Those should be returned too, 
-	 */
-	 public function getFullQualifiedClassname() {
-		 return $this->fqcn;
-	 }
-	 
-	/**
-	 * Set the location information for this logging event. The collected
-	 * information is cached for future use.
-	 *
-	 * <p>This method uses {@link PHP_MANUAL#debug_backtrace debug_backtrace()} function (if exists)
-	 * to collect informations about caller.</p>
-	 * <p>It only recognize informations generated by {@link Logger} and its subclasses.</p>
-	 * @return LoggerLocationInfo
-	 */
-	public function getLocationInformation() {
-		if($this->locationInfo === null) {
-
-			$locationInfo = array();
-			$trace = debug_backtrace();
-			$prevHop = null;
-			// make a downsearch to identify the caller
-			$hop = array_pop($trace);
-			while($hop !== null) {
-				if(isset($hop['class'])) {
-					// we are sometimes in functions = no class available: avoid php warning here
-					$className = strtolower($hop['class']);
-					if(!empty($className) and ($className == 'logger' or 
-						strtolower(get_parent_class($className)) == 'logger')) {
-						$locationInfo['line'] = $hop['line'];
-						$locationInfo['file'] = $hop['file'];
-						break;
-					}
-				}
-				$prevHop = $hop;
-				$hop = array_pop($trace);
-			}
-			$locationInfo['class'] = isset($prevHop['class']) ? $prevHop['class'] : 'main';
-			if(isset($prevHop['function']) and
-				$prevHop['function'] !== 'include' and
-				$prevHop['function'] !== 'include_once' and
-				$prevHop['function'] !== 'require' and
-				$prevHop['function'] !== 'require_once') {
-
-				$locationInfo['function'] = $prevHop['function'];
-			} else {
-				$locationInfo['function'] = 'main';
-			}
-					 
-			$this->locationInfo = new LoggerLocationInfo($locationInfo, $this->fqcn);
-		}
-		return $this->locationInfo;
-	}
-
-	/**
-	 * Return the level of this event. Use this form instead of directly
-	 * accessing the {@link $level} field.
-	 * @return LoggerLevel	
-	 */
-	public function getLevel() {
-		return $this->level;
-	}
-
-	/**
-	 * Returns the logger which created the event.
-	 * @return Logger
-	 */
-	public function getLogger() {
-		return $this->logger;
-	}
-	
-	/**
-	 * Return the name of the logger. Use this form instead of directly
-	 * accessing the {@link $categoryName} field.
-	 * @return string  
-	 */
-	public function getLoggerName() {
-		return $this->categoryName;
-	}
-
-	/**
-	 * Return the message for this logging event.
-	 * @return mixed
-	 */
-	public function getMessage() {
-		return $this->message;
-	}
-
-	/**
-	 * This method returns the NDC for this event. It will return the
-	 * correct content even if the event was generated in a different
-	 * thread or even on a different machine. The {@link LoggerNDC::get()} method
-	 * should <b>never</b> be called directly.
-	 * @return string  
-	 */
-	public function getNDC() {
-		if($this->ndcLookupRequired) {
-			$this->ndcLookupRequired = false;
-			$this->ndc = LoggerNDC::get();
-		}
-		return $this->ndc;
-	}
-
-	/**
-	 * Returns the the context corresponding to the <code>key</code>
-	 * parameter.
-	 * @return string
-	 */
-	public function getMDC($key) {
-		return LoggerMDC::get($key);
-	}
-	
-	/**
-	 * Returns the entire MDC context.
-	 * @return array
-	 */
-	public function getMDCMap () {
-		return LoggerMDC::getMap();
-	}
-
-	/**
-	 * Render message.
-	 * @return string
-	 */
-	public function getRenderedMessage() {
-		if($this->renderedMessage === null and $this->message !== null) {
-			if(is_string($this->message)) {
-				$this->renderedMessage = $this->message;
-			} else {
-				$rendererMap = Logger::getHierarchy()->getRendererMap();
-				$this->renderedMessage= $rendererMap->findAndRender($this->message);
-			}
-		}
-		return $this->renderedMessage;
-	}
-
-	/**
-	 * Returns the time when the application started, as a UNIX timestamp 
-	 * with microseconds.
-	 * @return float
-	 */
-	public static function getStartTime() {
-		if(!isset(self::$startTime)) {
-			self::$startTime = microtime(true);
-		}
-		return self::$startTime; 
-	}
-
-	/**
-	 * @return float
-	 */
-	public function getTimeStamp() {
-		return $this->timeStamp;
-	}
-	
-	/**
-	 * Returns the time in seconds passed from the beginning of execution to 
-	 * the time the event was constructed.
-	 * 
-	 * @return float Seconds with microseconds in decimals.
-	 */
-	public function getRelativeTime() {
-		return $this->timeStamp - self::$startTime;
-	}
-	
-	/**
-	 * Returns the time in milliseconds passed from the beginning of execution
-	 * to the time the event was constructed.
-	 * 
-	 * @deprecated This method has been replaced by getRelativeTime which 
-	 * 		does not perform unneccesary multiplication and formatting.
-	 * 
-	 * @return integer 
-	 */
-	public function getTime() {
-		$eventTime = $this->getTimeStamp();
-		$eventStartTime = LoggerLoggingEvent::getStartTime();
-		return number_format(($eventTime - $eventStartTime) * 1000, 0, '', '');
-	}
-	
-	/**
-	 * @return mixed
-	 */
-	public function getThreadName() {
-		if ($this->threadName === null) {
-			$this->threadName = (string)getmypid();
-		}
-		return $this->threadName;
-	}
-
-	/**
-	 * @return mixed LoggerThrowableInformation
-	 */
-	public function getThrowableInformation() {
-		return $this->throwableInfo;
-	}
-	
-	/**
-	 * Serialize this object
-	 * @return string
-	 */
-	public function toString() {
-		serialize($this);
-	}
-	
-	/**
-	 * Avoid serialization of the {@link $logger} object
-	 */
-	public function __sleep() {
-		return array(
-			'fqcn',
-			'categoryName',
-			'level',
-			'ndc',
-			'ndcLookupRequired',
-			'message',
-			'renderedMessage',
-			'threadName',
-			'timeStamp',
-			'locationInfo',
-		);
-	}
-
-}
-
-LoggerLoggingEvent::getStartTime();

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/LoggerMDC.php
----------------------------------------------------------------------
diff --git a/src/main/php/LoggerMDC.php b/src/main/php/LoggerMDC.php
deleted file mode 100644
index 05bb549..0000000
--- a/src/main/php/LoggerMDC.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @package log4php
- */
-
-/**
- * The LoggerMDC class provides _mapped diagnostic contexts_.
- * 
- * A Mapped Diagnostic Context, or MDC in short, is an instrument for 
- * distinguishing interleaved log output from different sources. Log output 
- * is typically interleaved when a server handles multiple clients 
- * near-simultaneously.
- * 
- * This class is similar to the {@link LoggerNDC} class except that 
- * it is based on a map instead of a stack.
- * 
- * @version $Revision$
- * @since 0.3
- * @package log4php
- */
-class LoggerMDC {
-	
-	/** Holds the context map. */
-	private static $map = array();
-		
-	/**
-	 * Stores a context value as identified with the key parameter into the 
-	 * context map.
-	 *
-	 * @param string $key the key
-	 * @param string $value the value
-	 */
-	public static function put($key, $value) {
-		self::$map[$key] = $value;
-	}
-  
-	/**
-	 * Returns the context value identified by the key parameter.
-	 *
-	 * @param string $key The key.
-	 * @return string The context or an empty string if no context found
-	 * 	for given key.
-	 */
-	public static function get($key) {
-		return isset(self::$map[$key]) ? self::$map[$key] : '';
-	}
-
-	/**
-	 * Returns the contex map as an array.
-	 * @return array The MDC context map.
-	 */
-	public static function getMap() {
-		return self::$map;
-	}
-
-	/**
-	 * Removes the the context identified by the key parameter. 
-	 *
-	 * Only affects user mappings, not $_ENV or $_SERVER.
-	 *
-	 * @param string $key The key to be removed.
-	 */
-	public static function remove($key) {
-		unset(self::$map[$key]);
-	}
-	
-	/**
-	 * Clears the mapped diagnostic context.
-	 */
-	public static function clear() {
-		self::$map = array();
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/LoggerNDC.php
----------------------------------------------------------------------
diff --git a/src/main/php/LoggerNDC.php b/src/main/php/LoggerNDC.php
deleted file mode 100644
index 9c01620..0000000
--- a/src/main/php/LoggerNDC.php
+++ /dev/null
@@ -1,203 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @package log4php
- */
-
-/**
- * The NDC class implements <i>nested diagnostic contexts</i>.
- * 
- * NDC was defined by Neil Harrison in the article "Patterns for Logging
- * Diagnostic Messages" part of the book <i>"Pattern Languages of
- * Program Design 3"</i> edited by Martin et al.
- *
- * A Nested Diagnostic Context, or NDC in short, is an instrument
- * to distinguish interleaved log output from different sources. Log
- * output is typically interleaved when a server handles multiple
- * clients near-simultaneously.
- *
- * This class is similar to the {@link LoggerMDC} class except that it is
- * based on a stack instead of a map.
- *
- * Interleaved log output can still be meaningful if each log entry
- * from different contexts had a distinctive stamp. This is where NDCs
- * come into play.
- *
- * <b>Note that NDCs are managed on a per thread basis</b>. 
- * 
- * NDC operations such as {@link push()}, {@link pop()}, 
- * {@link clear()}, {@link getDepth()} and {@link setMaxDepth()}
- * affect the NDC of the <i>current</i> thread only. NDCs of other
- * threads remain unaffected.
- *
- * For example, a servlet can build a per client request NDC
- * consisting the clients host name and other information contained in
- * the the request. <i>Cookies</i> are another source of distinctive
- * information. To build an NDC one uses the {@link push()}
- * operation.
- * 
- * Simply put,
- *
- * - Contexts can be nested.
- * - When entering a context, call <kbd>LoggerNDC::push()</kbd>
- *	 As a side effect, if there is no nested diagnostic context for the
- *	 current thread, this method will create it.
- * - When leaving a context, call <kbd>LoggerNDC::pop()</kbd>
- * - <b>When exiting a thread make sure to call {@link remove()}</b>
- *	 
- * There is no penalty for forgetting to match each
- * <kbd>push</kbd> operation with a corresponding <kbd>pop</kbd>,
- * except the obvious mismatch between the real application context
- * and the context set in the NDC.
- *
- * If configured to do so, {@link LoggerPatternLayout} and {@link LoggerLayoutTTCC} 
- * instances automatically retrieve the nested diagnostic
- * context for the current thread without any user intervention.
- * Hence, even if a servlet is serving multiple clients
- * simultaneously, the logs emanating from the same code (belonging to
- * the same category) can still be distinguished because each client
- * request will have a different NDC tag.
- *
- * Example:
- *	
- * {@example ../../examples/php/ndc.php 19}<br>
- *
- * With the properties file:
- * 
- * {@example ../../examples/resources/ndc.properties 18}<br>
- * 
- * Will result in the following (notice the conn and client ids):
- * 
- * <pre>
- * 2009-09-13 19:04:27 DEBUG root conn=1234: just received a new connection in src/examples/php/ndc.php at 23
- * 2009-09-13 19:04:27 DEBUG root conn=1234 client=ab23: some more messages that can in src/examples/php/ndc.php at 25
- * 2009-09-13 19:04:27 DEBUG root conn=1234 client=ab23: now related to a client in src/examples/php/ndc.php at 26
- * 2009-09-13 19:04:27 DEBUG root : back and waiting for new connections in src/examples/php/ndc.php at 29
- * </pre>
- *	
- * @version $Revision$
- * @package log4php 
- * @since 0.3
- */
-class LoggerNDC {
-	
-	/** This is the repository of NDC stack */
-	private static $stack = array();
-	
-	/**
-	 * Clear any nested diagnostic information if any. This method is
-	 * useful in cases where the same thread can be potentially used
-	 * over and over in different unrelated contexts.
-	 *
-	 * <p>This method is equivalent to calling the {@link setMaxDepth()}
-	 * method with a zero <var>maxDepth</var> argument.
-	 */
-	public static function clear() {
-		self::$stack = array();
-	}
-
-	/**
-	 * Never use this method directly, use the {@link LoggerLoggingEvent::getNDC()} method instead.
-	 * @return array
-	 */
-	public static function get() {
-		return implode(' ', self::$stack);
-	}
-  
-	/**
-	 * Get the current nesting depth of this diagnostic context.
-	 *
-	 * @see setMaxDepth()
-	 * @return integer
-	 */
-	public static function getDepth() {
-		return count(self::$stack);
-	}
-
-	/**
-	 * Clients should call this method before leaving a diagnostic
-	 * context.
-	 *
-	 * <p>The returned value is the value that was pushed last. If no
-	 * context is available, then the empty string "" is returned.</p>
-	 *
-	 * @return string The innermost diagnostic context.
-	 */
-	public static function pop() {
-		if(count(self::$stack) > 0) {
-			return array_pop(self::$stack);
-		} else {
-			return '';
-		}
-	}
-
-	/**
-	 * Looks at the last diagnostic context at the top of this NDC
-	 * without removing it.
-	 *
-	 * <p>The returned value is the value that was pushed last. If no
-	 * context is available, then the empty string "" is returned.</p>
-	 * @return string The innermost diagnostic context.
-	 */
-	public static function peek() {
-		if(count(self::$stack) > 0) {
-			return end(self::$stack);
-		} else {
-			return '';
-		}
-	}
-	
-	/**
-	 * Push new diagnostic context information for the current thread.
-	 *
-	 * <p>The contents of the <var>message</var> parameter is
-	 * determined solely by the client.
-	 *	
-	 * @param string $message The new diagnostic context information.
-	 */
-	public static function push($message) {
-		array_push(self::$stack, (string)$message);
-	}
-
-	/**
-	 * Remove the diagnostic context for this thread.
-	 */
-	public static function remove() {
-		LoggerNDC::clear();
-	}
-
-	/**
-	 * Set maximum depth of this diagnostic context. If the current
-	 * depth is smaller or equal to <var>maxDepth</var>, then no
-	 * action is taken.
-	 *
-	 * <p>This method is a convenient alternative to multiple 
-	 * {@link pop()} calls. Moreover, it is often the case that at 
-	 * the end of complex call sequences, the depth of the NDC is
-	 * unpredictable. The {@link setMaxDepth()} method circumvents
-	 * this problem.
-	 *
-	 * @param integer $maxDepth
-	 * @see getDepth()
-	 */
-	public static function setMaxDepth($maxDepth) {
-		$maxDepth = (int)$maxDepth;
-		if(LoggerNDC::getDepth() > $maxDepth) {
-			self::$stack = array_slice(self::$stack, 0, $maxDepth);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/LoggerReflectionUtils.php
----------------------------------------------------------------------
diff --git a/src/main/php/LoggerReflectionUtils.php b/src/main/php/LoggerReflectionUtils.php
deleted file mode 100644
index e046185..0000000
--- a/src/main/php/LoggerReflectionUtils.php
+++ /dev/null
@@ -1,152 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- * @package log4php
- */
- 
-/**
- * Provides methods for reflective use on php objects
- * @package log4php
- */
-class LoggerReflectionUtils {
-		/** the target object */
-	private $obj;
-	
-	/**
-	 * Create a new LoggerReflectionUtils for the specified Object. 
-	 * This is done in prepartion for invoking {@link setProperty()} 
-	 * one or more times.
-	 * @param object &$obj the object for which to set properties
-	 */
-	public function __construct($obj) {
-		$this->obj = $obj;
-	}
-	
-	/**
-	 * Set the properties of an object passed as a parameter in one
-	 * go. The <code>properties</code> are parsed relative to a
-	 * <code>prefix</code>.
-	 *
-	 * @param object $obj The object to configure.
-	 * @param array $properties An array containing keys and values.
-	 * @param string $prefix Only keys having the specified prefix will be set.
-	 */
-	 // TODO: check, if this is really useful
-	public static function setPropertiesByObject($obj, $properties, $prefix) {
-		$pSetter = new LoggerReflectionUtils($obj);
-		return $pSetter->setProperties($properties, $prefix);
-	}
-	
-	
-	/**
-	 * Set the properites for the object that match the
-	 * <code>prefix</code> passed as parameter.
-	 * 
-	 * Example:
-	 * 
-	 * $arr['xxxname'] = 'Joe';
- 	 * $arr['xxxmale'] = true;
-	 * and prefix xxx causes setName and setMale.	
-	 *
-	 * @param array $properties An array containing keys and values.
-	 * @param string $prefix Only keys having the specified prefix will be set.
-	 */
-	public function setProperties($properties, $prefix) {
-		$len = strlen($prefix);
-		reset($properties);
-		while(list($key,) = each($properties)) {
-			if(strpos($key, $prefix) === 0) {
-				if(strpos($key, '.', ($len + 1)) > 0) {
-					continue;
-				}
-				$value = $properties[$key];
-				$key = substr($key, $len);
-				if($key == 'layout' and ($this->obj instanceof LoggerAppender)) {
-					continue;
-				}
-				$this->setProperty($key, $value);
-			}
-		}
-		$this->activate();
-	}
-	
-	/**
-	 * Set a property on this PropertySetter's Object. If successful, this
-	 * method will invoke a setter method on the underlying Object. The
-	 * setter is the one for the specified property name and the value is
-	 * determined partly from the setter argument type and partly from the
-	 * value specified in the call to this method.
-	 *
-	 * <p>If the setter expects a String no conversion is necessary.
-	 * If it expects an int, then an attempt is made to convert 'value'
-	 * to an int using new Integer(value). If the setter expects a boolean,
-	 * the conversion is by new Boolean(value).
-	 *
-	 * @param string $name	name of the property
-	 * @param string $value	String value of the property
-	 */
-	public function setProperty($name, $value) {
-		if($value === null) {
-			return;
-		}
-		
-		$method = "set" . ucfirst($name);
-		
-		if(!method_exists($this->obj, $method)) {
-			throw new Exception("Error setting log4php property $name to $value: no method $method in class ".get_class($this->obj)."!");
-		} else {
-			return call_user_func(array($this->obj, $method), $value);
-		} 
-	}
-	
-	public function activate() {
-		if(method_exists($this->obj, 'activateoptions')) {
-			return call_user_func(array($this->obj, 'activateoptions'));
-		} 
-	}
-	
-	/**
-	 * Creates an instances from the given class name.
-	 *
-	 * @param string $classname
-	 * @return an object from the class with the given classname
-	 */
-	public static function createObject($class) {
-		if(!empty($class)) {
-			return new $class();
-		}
-		return null;
-	}
-	
-	/**
-	 * @param object $object
-	 * @param string $name
-	 * @param mixed $value
-	 */
-	public static function setter($object, $name, $value) {
-		if (empty($name)) {
-			return false;
-		}
-		$methodName = 'set'.ucfirst($name);
-		if (method_exists($object, $methodName)) {
-			return call_user_func(array($object, $methodName), $value);
-		} else {
-			return false;
-		}
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/LoggerRoot.php
----------------------------------------------------------------------
diff --git a/src/main/php/LoggerRoot.php b/src/main/php/LoggerRoot.php
deleted file mode 100644
index 315837d..0000000
--- a/src/main/php/LoggerRoot.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @package log4php
- */
-
-/**
- * The root logger.
- *
- * @version $Revision$
- * @package log4php
- * @see Logger
- */
-class LoggerRoot extends Logger {
-	/**
-	 * Constructor
-	 *
-	 * @param integer $level initial log level
-	 */
-	public function __construct(LoggerLevel $level = null) {
-		parent::__construct('root');
-
-		if($level == null) {
-			$level = LoggerLevel::getLevelAll();
-		}
-		$this->setLevel($level);
-	} 
-	
-	/**
-	 * @return LoggerLevel the level
-	 */
-	public function getEffectiveLevel() {
-		return $this->getLevel();
-	}
-	
-	/**
-	 * Override level setter to prevent setting the root logger's level to 
-	 * null. Root logger must always have a level.
-	 * 
-	 * @param LoggerLevel $level
-	 */
-	public function setLevel(LoggerLevel $level = null) {
-		if (isset($level)) {
-			parent::setLevel($level);
-		} else {
-			trigger_error("log4php: Cannot set LoggerRoot level to null.", E_USER_WARNING);
-		}
-	}
-	
-	/**
-	 * Override parent setter. Root logger cannot have a parent.
-	 * @param Logger $parent
-	 */
-	public function setParent(Logger $parent) {
-		trigger_error("log4php: LoggerRoot cannot have a parent.", E_USER_WARNING);
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/LoggerThrowableInformation.php
----------------------------------------------------------------------
diff --git a/src/main/php/LoggerThrowableInformation.php b/src/main/php/LoggerThrowableInformation.php
deleted file mode 100644
index 20bf758..0000000
--- a/src/main/php/LoggerThrowableInformation.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @package log4php
- */
-
-/**
- * The internal representation of throwables.
- *
- * @package log4php
- * @since 2.1
- */
-class LoggerThrowableInformation {
-	
-	/** @var Exception Throwable to log */
-	private $throwable;
-	
-	/** @var array Array of throwable messages */
-	private $throwableArray;
-	
-	/**
-	 * Create a new instance
-	 * 
-	 * @param $throwable - a throwable as a exception
-	 * @param $logger - Logger reference
-	 */
-	public function __construct(Exception $throwable) {
-		$this->throwable = $throwable;
-	}
-	
-	/**
-	* Return source exception
-	* 
-	* @return Exception
-	*/
-	public function getThrowable() {
-		return $this->throwable;
-	}
-	
-	/**
-	 * @desc Returns string representation of throwable
-	 * 
-	 * @return array 
-	 */
-	public function getStringRepresentation() {
-		if (!is_array($this->throwableArray)) {
-			$renderer = new LoggerRendererException();
-			
-			$this->throwableArray = explode("\n", $renderer->render($this->throwable));
-		}
-		
-		return $this->throwableArray;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/appenders/LoggerAppenderConsole.php
----------------------------------------------------------------------
diff --git a/src/main/php/appenders/LoggerAppenderConsole.php b/src/main/php/appenders/LoggerAppenderConsole.php
deleted file mode 100644
index dd8bfd2..0000000
--- a/src/main/php/appenders/LoggerAppenderConsole.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * LoggerAppenderConsole appends log events either to the standard output 
- * stream (php://stdout) or the standard error stream (php://stderr).
- * 
- * **Note**: Use this Appender with command-line php scripts. On web scripts 
- * this appender has no effects.
- *
- * This appender uses a layout.
- *
- * ## Configurable parameters: ##
- * 
- * - **target** - the target stream: "stdout" or "stderr"
- * 
- * @version $Revision$
- * @package log4php
- * @subpackage appenders
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
- * @link http://logging.apache.org/log4php/docs/appenders/console.html Appender documentation
- */
- class LoggerAppenderConsole extends LoggerAppender {
-
-	/** The standard otuput stream.  */
-	const STDOUT = 'php://stdout';
-	
-	/** The standard error stream.*/
-	const STDERR = 'php://stderr';
-
-	/** The 'target' parameter. */
-	protected $target = self::STDOUT;
-	
-	/**
-	 * Stream resource for the target stream.
-	 * @var resource
-	 */
-	protected $fp = null;
-
-	public function activateOptions() {
-		$this->fp = fopen($this->target, 'w');
-		if(is_resource($this->fp) && $this->layout !== null) {
-			fwrite($this->fp, $this->layout->getHeader());
-		}
-		$this->closed = (bool)is_resource($this->fp) === false;
-	}
-	
-	
-	public function close() {
-		if($this->closed != true) {
-			if (is_resource($this->fp) && $this->layout !== null) {
-				fwrite($this->fp, $this->layout->getFooter());
-				fclose($this->fp);
-			}
-			$this->closed = true;
-		}
-	}
-
-	public function append(LoggerLoggingEvent $event) {
-		if (is_resource($this->fp) && $this->layout !== null) {
-			fwrite($this->fp, $this->layout->format($event));
-		}
-	}
-	
-	/**
-	 * Sets the 'target' parameter.
-	 * @param string $target
-	 */
-	public function setTarget($target) {
-		$value = trim($target);
-		if ($value == self::STDOUT || strtoupper($value) == 'STDOUT') {
-			$this->target = self::STDOUT;
-		} elseif ($value == self::STDERR || strtoupper($value) == 'STDERR') {
-			$this->target = self::STDERR;
-		} else {
-			$target = var_export($target);
-			$this->warn("Invalid value given for 'target' property: [$target]. Property not set.");
-		}
-	}
-	
-	/**
-	 * Returns the value of the 'target' parameter.
-	 * @return string
-	 */
-	public function getTarget() {
-		return $this->target;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/appenders/LoggerAppenderDailyFile.php
----------------------------------------------------------------------
diff --git a/src/main/php/appenders/LoggerAppenderDailyFile.php b/src/main/php/appenders/LoggerAppenderDailyFile.php
deleted file mode 100644
index 8dce015..0000000
--- a/src/main/php/appenders/LoggerAppenderDailyFile.php
+++ /dev/null
@@ -1,130 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * An Appender that automatically creates a new logfile each day.
- *
- * The file is rolled over once a day. That means, for each day a new file 
- * is created. A formatted version of the date pattern is used as to create 
- * the file name using the {@link PHP_MANUAL#sprintf} function.
- *
- * This appender uses a layout.
- * 
- * ##Configurable parameters:##
- * 
- * - **datePattern** - Format for the date in the file path, follows formatting
- *     rules used by the PHP date() function. Default value: "Ymd".
- * - **file** - Path to the target file. Should contain a %s which gets 
- *     substituted by the date.
- * - **append** - If set to true, the appender will append to the file, 
- *     otherwise the file contents will be overwritten. Defaults to true.
- * 
- * @version $Revision$
- * @package log4php
- * @subpackage appenders
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
- * @link http://logging.apache.org/log4php/docs/appenders/daily-file.html Appender documentation
- */
-class LoggerAppenderDailyFile extends LoggerAppenderFile {
-
-	/**
-	 * The 'datePattern' parameter.
-	 * Determines how date will be formatted in file name.
-	 * @var string
-	 */
-	protected $datePattern = "Ymd";
-	
-	/**
-	 * Current date which was used when opening a file.
-	 * Used to determine if a rollover is needed when the date changes.
-	 * @var string
-	 */
-	protected $currentDate;
-
-	/** Additional validation for the date pattern. */
-	public function activateOptions() {
-		parent::activateOptions();
-	
-		if (empty($this->datePattern)) {
-			$this->warn("Required parameter 'datePattern' not set. Closing appender.");
-			$this->closed = true;
-			return;
-		}
-	}
-
-	/**
-	 * Appends a logging event.
-	 * 
-	 * If the target file changes because of passage of time (e.g. at midnight) 
-	 * the current file is closed. A new file, with the new date, will be 
-	 * opened by the write() method. 
-	 */
-	public function append(LoggerLoggingEvent $event) {
-		$eventDate = $this->getDate($event->getTimestamp());
-		
-		// Initial setting of current date
-		if (!isset($this->currentDate)) {
-			$this->currentDate = $eventDate;
-		} 
-		
-		// Check if rollover is needed
-		else if ($this->currentDate !== $eventDate) {
-			$this->currentDate = $eventDate;
-			
-			// Close the file if it's open.
-			// Note: $this->close() is not called here because it would set
-			//       $this->closed to true and the appender would not recieve
-			//       any more logging requests
-			if (is_resource($this->fp)) {
-				$this->write($this->layout->getFooter());
-				fclose($this->fp);
-			}
-			$this->fp = null;
-		}
-	
-		parent::append($event);
-	}
-	
-	/** Renders the date using the configured <var>datePattern<var>. */
-	protected function getDate($timestamp = null) {
-		return date($this->datePattern, $timestamp);
-	}
-	
-	/**
-	 * Determines target file. Replaces %s in file path with a date. 
-	 */
-	protected function getTargetFile() {
-		return str_replace('%s', $this->currentDate, $this->file);
-	}
-	
-	/**
-	 * Sets the 'datePattern' parameter.
-	 * @param string $datePattern
-	 */
-	public function setDatePattern($datePattern) {
-		$this->setString('datePattern', $datePattern);
-	}
-	
-	/**
-	 * Returns the 'datePattern' parameter.
-	 * @return string
-	 */
-	public function getDatePattern() {
-		return $this->datePattern;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/appenders/LoggerAppenderEcho.php
----------------------------------------------------------------------
diff --git a/src/main/php/appenders/LoggerAppenderEcho.php b/src/main/php/appenders/LoggerAppenderEcho.php
deleted file mode 100644
index eabeb1e..0000000
--- a/src/main/php/appenders/LoggerAppenderEcho.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * LoggerAppenderEcho uses the PHP echo() function to output events. 
- * 
- * This appender uses a layout.
- * 
- * ## Configurable parameters: ##
- * 
- * - **htmlLineBreaks** - If set to true, a <br /> element will be inserted 
- *     before each line break in the logged message. Default is false.
- *
- * @version $Revision$
- * @package log4php
- * @subpackage appenders
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
- * @link http://logging.apache.org/log4php/docs/appenders/echo.html Appender documentation
- */
-class LoggerAppenderEcho extends LoggerAppender {
-	/** 
-	 * Used to mark first append. Set to false after first append.
-	 * @var boolean 
-	 */
-	protected $firstAppend = true;
-	
-	/** 
-	 * If set to true, a <br /> element will be inserted before each line
-	 * break in the logged message. Default value is false. @var boolean 
-	 */
-	protected $htmlLineBreaks = false;
-	
-	public function close() {
-		if($this->closed != true) {
-			if(!$this->firstAppend) {
-				echo $this->layout->getFooter();
-			}
-		}
-		$this->closed = true;
-	}
-
-	public function append(LoggerLoggingEvent $event) {
-		if($this->layout !== null) {
-			if($this->firstAppend) {
-				echo $this->layout->getHeader();
-				$this->firstAppend = false;
-			}
-			$text = $this->layout->format($event);
-			
-			if ($this->htmlLineBreaks) {
-				$text = nl2br($text);
-			}
-			echo $text;
-		} 
-	}
-	
-	/**
-	 * Sets the 'htmlLineBreaks' parameter.
-	 * @param boolean $value
-	 */
-	public function setHtmlLineBreaks($value) {
-		$this->setBoolean('htmlLineBreaks', $value);
-	}
-	
-	/**
-	 * Returns the 'htmlLineBreaks' parameter.
-	 * @returns boolean
-	 */
-	public function getHtmlLineBreaks() {
-		return $this->htmlLineBreaks;
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/appenders/LoggerAppenderFile.php
----------------------------------------------------------------------
diff --git a/src/main/php/appenders/LoggerAppenderFile.php b/src/main/php/appenders/LoggerAppenderFile.php
deleted file mode 100644
index f29cbe3..0000000
--- a/src/main/php/appenders/LoggerAppenderFile.php
+++ /dev/null
@@ -1,225 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * LoggerAppenderFile appends log events to a file.
- *
- * This appender uses a layout.
- * 
- * ## Configurable parameters: ##
- * 
- * - **file** - Path to the target file. Relative paths are resolved based on 
- *     the working directory.
- * - **append** - If set to true, the appender will append to the file, 
- *     otherwise the file contents will be overwritten.
- *
- * @version $Revision$
- * @package log4php
- * @subpackage appenders
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
- * @link http://logging.apache.org/log4php/docs/appenders/file.html Appender documentation
- */
-class LoggerAppenderFile extends LoggerAppender {
-
-	/**
-	 * If set to true, the file is locked before appending. This allows 
-	 * concurrent access. However, appending without locking is faster so
-	 * it should be used where appropriate.
-	 * 
-	 * TODO: make this a configurable parameter
-	 * 
-	 * @var boolean
-	 */
-	protected $locking = true;
-	
-	/**
-	 * If set to true, appends to file. Otherwise overwrites it.
-	 * @var boolean
-	 */
-	protected $append = true;
-	
-	/**
-	 * Path to the target file.
-	 * @var string 
-	 */
-	protected $file;
-
-	/**
-	 * The file resource.
-	 * @var resource
-	 */
-	protected $fp;
-	
-	/** 
-	 * Helper function which can be easily overriden by daily file appender. 
-	 */
-	protected function getTargetFile() {
-		return $this->file;
-	}
-	
-	/**
-	 * Acquires the target file resource, creates the destination folder if 
-	 * necessary. Writes layout header to file.
-	 * 
-	 * @return boolean FALSE if opening failed
-	 */
-	protected function openFile() {
-		$file = $this->getTargetFile();
-
-		// Create the target folder if needed
-		if(!is_file($file)) {
-			$dir = dirname($file);
-
-			if(!is_dir($dir)) {
-				$success = mkdir($dir, 0777, true);
-				if ($success === false) {
-					$this->warn("Failed creating target directory [$dir]. Closing appender.");
-					$this->closed = true;
-					return false;
-				}
-			}
-		}
-		
-		$mode = $this->append ? 'a' : 'w';
-		$this->fp = fopen($file, $mode);
-		if ($this->fp === false) {
-			$this->warn("Failed opening target file. Closing appender.");
-			$this->fp = null;
-			$this->closed = true;
-			return false;
-		}
-		
-		// Required when appending with concurrent access
-		if($this->append) {
-			fseek($this->fp, 0, SEEK_END);
-		}
-		
-		// Write the header
-		$this->write($this->layout->getHeader());
-	}
-	
-	/**
-	 * Writes a string to the target file. Opens file if not already open.
-	 * @param string $string Data to write.
-	 */
-	protected function write($string) {
-		// Lazy file open
-		if(!isset($this->fp)) {
-			if ($this->openFile() === false) {
-				return; // Do not write if file open failed.
-			}
-		}
-		
-		if ($this->locking) {
-			$this->writeWithLocking($string);
-		} else {
-			$this->writeWithoutLocking($string);
-		}
-	}
-	
-	protected function writeWithLocking($string) {
-		if(flock($this->fp, LOCK_EX)) {
-			if(fwrite($this->fp, $string) === false) {
-				$this->warn("Failed writing to file. Closing appender.");
-				$this->closed = true;				
-			}
-			flock($this->fp, LOCK_UN);
-		} else {
-			$this->warn("Failed locking file for writing. Closing appender.");
-			$this->closed = true;
-		}
-	}
-	
-	protected function writeWithoutLocking($string) {
-		if(fwrite($this->fp, $string) === false) {
-			$this->warn("Failed writing to file. Closing appender.");
-			$this->closed = true;				
-		}
-	}
-	
-	public function activateOptions() {
-		if (empty($this->file)) {
-			$this->warn("Required parameter 'file' not set. Closing appender.");
-			$this->closed = true;
-			return;
-		}
-	}
-	
-	public function close() {
-		if (is_resource($this->fp)) {
-			$this->write($this->layout->getFooter());
-			fclose($this->fp);
-		}
-		$this->fp = null;
-		$this->closed = true;
-	}
-
-	public function append(LoggerLoggingEvent $event) {
-		$this->write($this->layout->format($event));
-	}
-	
-	/**
-	 * Sets the 'file' parameter.
-	 * @param string $file
-	 */
-	public function setFile($file) {
-		$this->setString('file', $file);
-	}
-	
-	/**
-	 * Returns the 'file' parameter.
-	 * @return string
-	 */
-	public function getFile() {
-		return $this->file;
-	}
-	
-	/**
-	 * Returns the 'append' parameter.
-	 * @return boolean
-	 */
-	public function getAppend() {
-		return $this->append;
-	}
-
-	/**
-	 * Sets the 'append' parameter.
-	 * @param boolean $append
-	 */
-	public function setAppend($append) {
-		$this->setBoolean('append', $append);
-	}
-
-	/**
-	 * Sets the 'file' parmeter. Left for legacy reasons.
-	 * @param string $fileName
-	 * @deprecated Use setFile() instead.
-	 */
-	public function setFileName($fileName) {
-		$this->setFile($fileName);
-	}
-	
-	/**
-	 * Returns the 'file' parmeter. Left for legacy reasons.
-	 * @return string
-	 * @deprecated Use getFile() instead.
-	 */
-	public function getFileName() {
-		return $this->getFile();
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/appenders/LoggerAppenderFirePHP.php
----------------------------------------------------------------------
diff --git a/src/main/php/appenders/LoggerAppenderFirePHP.php b/src/main/php/appenders/LoggerAppenderFirePHP.php
deleted file mode 100644
index b9ac76c..0000000
--- a/src/main/php/appenders/LoggerAppenderFirePHP.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Logs messages as HTTP headers using the FirePHP Insight API.
- * 
- * This appender requires the FirePHP server library version 1.0 or later.
- * 
- * ## Configurable parameters: ##
- * 
- * - **target** - (string) The target to which messages will be sent. Possible options are 
- *            'page' (default), 'request', 'package' and 'controller'. For more details,
- *            see FirePHP documentation.
- * 
- * This class was originally contributed by Bruce Ingalls (Bruce.Ingalls-at-gmail-dot-com).
- * 
- * @link https://github.com/firephp/firephp FirePHP homepage.
- * @link http://sourcemint.com/github.com/firephp/firephp/1:1.0.0b1rc6/-docs/Welcome FirePHP documentation.
- * @link http://sourcemint.com/github.com/firephp/firephp/1:1.0.0b1rc6/-docs/Configuration/Constants FirePHP constants documentation.
- * @link http://logging.apache.org/log4php/docs/appenders/firephp.html Appender documentation
- * 
- * @version $Revision$
- * @package log4php
- * @subpackage appenders
- * @since 2.3
- */
-class LoggerAppenderFirePHP extends LoggerAppender {
-	
-	/**
-	 * Instance of the Insight console class.
-	 * @var Insight_Plugin_Console
-	 */
-	protected $console;
-	
-	/**
-	 * The target for log messages. Possible values are: 'page' (default), 
-	 * 'request', 'package' and 'contoller'.
-	 */
-	protected $target = 'page';
-
-	public function activateOptions() {
-		if (method_exists('FirePHP', 'to')) {
-			$this->console = FirePHP::to($this->target)->console();
-			$this->closed = false;
-		} else {
-			$this->warn('FirePHP is not installed correctly. Closing appender.');
-		}
-	}
-	
-	public function append(LoggerLoggingEvent $event) {
-		$msg = $event->getMessage();
-		
-		// Skip formatting for objects and arrays which are handled by FirePHP.
-		if (!is_array($msg) && !is_object($msg)) {
-			$msg = $this->getLayout()->format($event);
-		}
-		
-		switch ($event->getLevel()->toInt()) {
-			case LoggerLevel::TRACE:
-			case LoggerLevel::DEBUG:
-				$this->console->log($msg);
-				break;
-			case LoggerLevel::INFO:
-				$this->console->info($msg);
-				break;
-			case LoggerLevel::WARN:
-				$this->console->warn($msg);
-				break;
-			case LoggerLevel::ERROR:
-			case LoggerLevel::FATAL:
-				$this->console->error($msg);
-				break;
-		}
-	}
-	
-	/** Returns the target. */
-	public function getTarget() {
-		return $this->target;
-	}
-
-	/** Sets the target. */
-	public function setTarget($target) {
-		$this->setString('target', $target);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/appenders/LoggerAppenderMail.php
----------------------------------------------------------------------
diff --git a/src/main/php/appenders/LoggerAppenderMail.php b/src/main/php/appenders/LoggerAppenderMail.php
deleted file mode 100644
index efa3495..0000000
--- a/src/main/php/appenders/LoggerAppenderMail.php
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * LoggerAppenderMail appends log events via email.
- *
- * This appender does not send individual emails for each logging requests but 
- * will collect them in a buffer and send them all in a single email once the 
- * appender is closed (i.e. when the script exists). Because of this, it may 
- * not appropriate for long running scripts, in which case 
- * LoggerAppenderMailEvent might be a better choice.
- * 
- * This appender uses a layout.
- * 
- * ## Configurable parameters: ##
- * 
- * - **to** - Email address(es) to which the log will be sent. Multiple email 
- *     addresses may be specified by separating them with a comma.
- * - **from** - Email address which will be used in the From field.
- * - **subject** - Subject of the email message.
- * 
- * @version $Revision$
- * @package log4php
- * @subpackage appenders
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
- * @link http://logging.apache.org/log4php/docs/appenders/mail.html Appender documentation
- */
-class LoggerAppenderMail extends LoggerAppender {
-
-	/** 
-	 * Email address to put in From field of the email.
-	 * @var string
-	 */
-	protected $from = null;
-
-	/** 
-	 * The subject of the email.
-	 * @var string
-	 */
-	protected $subject = 'Log4php Report';
-	
-	/**
-	 * One or more comma separated email addresses to which to send the email. 
-	 * @var string
-	 */
-	protected $to = null;
-
-	/** 
-	 * Indiciates whether this appender should run in dry mode.
-	 * @deprecated
-	 * @var boolean 
-	 */
-	protected $dry = false;
-
-	/** 
-	 * Buffer which holds the email contents before it is sent. 
-	 * @var string  
-	 */
-	protected $body = '';
-	
-	public function append(LoggerLoggingEvent $event) {
-		if($this->layout !== null) {
-			$this->body .= $this->layout->format($event);
-		}
-	}
-	
-	public function close() {
-		if($this->closed != true) {
-			$from = $this->from;
-			$to = $this->to;
-	
-			if(!empty($this->body) and $from !== null and $to !== null and $this->layout !== null) {
-				$subject = $this->subject;
-				if(!$this->dry) {
-					mail(
-						$to, $subject, 
-						$this->layout->getHeader() . $this->body . $this->layout->getFooter(),
-						"From: {$from}\r\n");
-				} else {
-				    echo "DRY MODE OF MAIL APP.: Send mail to: ".$to." with content: ".$this->body;
-				}
-			}
-			$this->closed = true;
-		}
-	}
-	
-	/** Sets the 'subject' parameter. */
-	public function setSubject($subject) {
-		$this->setString('subject', $subject);
-	}
-	
-	/** Returns the 'subject' parameter. */
-	public function getSubject() {
-		return $this->subject;
-	}
-	
-	/** Sets the 'to' parameter. */
-	public function setTo($to) {
-		$this->setString('to', $to);
-	}
-	
-	/** Returns the 'to' parameter. */
-	public function getTo() {
-		return $this->to;
-	}
-
-	/** Sets the 'from' parameter. */
-	public function setFrom($from) {
-		$this->setString('from', $from);
-	}
-	
-	/** Returns the 'from' parameter. */
-	public function getFrom() {
-		return $this->from;
-	}
-
-	/** Enables or disables dry mode. */
-	public function setDry($dry) {
-		$this->setBoolean('dry', $dry);
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/appenders/LoggerAppenderMailEvent.php
----------------------------------------------------------------------
diff --git a/src/main/php/appenders/LoggerAppenderMailEvent.php b/src/main/php/appenders/LoggerAppenderMailEvent.php
deleted file mode 100644
index f50adf8..0000000
--- a/src/main/php/appenders/LoggerAppenderMailEvent.php
+++ /dev/null
@@ -1,180 +0,0 @@
-<?php
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *	   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * LoggerAppenderMailEvent appends individual log events via email.
- * 
- * This appender is similar to LoggerAppenderMail, except that it sends each 
- * each log event in an individual email message at the time when it occurs.
- * 
- * This appender uses a layout.
- * 
- * ## Configurable parameters: ##
- * 
- * - **to** - Email address(es) to which the log will be sent. Multiple email
- *     addresses may be specified by separating them with a comma.
- * - **from** - Email address which will be used in the From field.
- * - **subject** - Subject of the email message.
- * - **smtpHost** - Used to override the SMTP server. Only works on Windows.
- * - **port** - Used to override the default SMTP server port. Only works on 
- *     Windows.
- *
- * @version $Revision$
- * @package log4php
- * @subpackage appenders
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
- * @link http://logging.apache.org/log4php/docs/appenders/mail-event.html Appender documentation
- */
-class LoggerAppenderMailEvent extends LoggerAppender {
-
-	/** 
-	 * Email address to put in From field of the email.
-	 * @var string
-	 */
-	protected $from;
-
-	/** 
-	 * Mail server port (widnows only).
-	 * @var integer 
-	 */
-	protected $port = 25;
-
-	/** 
-	 * Mail server hostname (windows only).
-	 * @var string   
-	 */
-	protected $smtpHost;
-
-	/** 
-	 * The subject of the email.
-	 * @var string
-	 */
-	protected $subject = 'Log4php Report';
-
-	/**
-	 * One or more comma separated email addresses to which to send the email. 
-	 * @var string
-	 */
-	protected $to = null;
-	
-	/** 
-	 * Indiciates whether this appender should run in dry mode.
-	 * @deprecated
-	 * @var boolean 
-	 */
-	protected $dry = false;
-	
-	public function activateOptions() {
-		if (empty($this->to)) {
-			$this->warn("Required parameter 'to' not set. Closing appender.");
-			$this->close = true;
-			return;
-		}
-		
-		$sendmail_from = ini_get('sendmail_from');
-		if (empty($this->from) and empty($sendmail_from)) {
-			$this->warn("Required parameter 'from' not set. Closing appender.");
-			$this->close = true;
-			return;
-		}
-		
-		$this->closed = false;
-	}
-
-	public function append(LoggerLoggingEvent $event) {
-		$smtpHost = $this->smtpHost;
-		$prevSmtpHost = ini_get('SMTP');
-		if(!empty($smtpHost)) {
-			ini_set('SMTP', $smtpHost);
-		}
-	
-		$smtpPort = $this->port;
-		$prevSmtpPort= ini_get('smtp_port');
-		if($smtpPort > 0 and $smtpPort < 65535) {
-			ini_set('smtp_port', $smtpPort);
-		}
-	
-		// On unix only sendmail_path, which is PHP_INI_SYSTEM i.e. not changeable here, is used.
-	
-		$addHeader = empty($this->from) ? '' : "From: {$this->from}\r\n";
-	
-		if(!$this->dry) {
-			$result = mail($this->to, $this->subject, $this->layout->getHeader() . $this->layout->format($event) . $this->layout->getFooter($event), $addHeader);
-		} else {
-			echo "DRY MODE OF MAIL APP.: Send mail to: ".$this->to." with additional headers '".trim($addHeader)."' and content: ".$this->layout->format($event);
-		}
-			
-		ini_set('SMTP', $prevSmtpHost);
-		ini_set('smtp_port', $prevSmtpPort);
-	}
-	
-	/** Sets the 'from' parameter. */
-	public function setFrom($from) {
-		$this->setString('from', $from);
-	}
-	
-	/** Returns the 'from' parameter. */
-	public function getFrom() {
-		return $this->from;
-	}
-	
-	/** Sets the 'port' parameter. */
-	public function setPort($port) {
-		$this->setPositiveInteger('port', $port);
-	}
-	
-	/** Returns the 'port' parameter. */
-	public function getPort() {
-		return $this->port;
-	}
-	
-	/** Sets the 'smtpHost' parameter. */
-	public function setSmtpHost($smtpHost) {
-		$this->setString('smtpHost', $smtpHost);
-	}
-	
-	/** Returns the 'smtpHost' parameter. */
-	public function getSmtpHost() {
-		return $this->smtpHost;
-	}
-	
-	/** Sets the 'subject' parameter. */
-	public function setSubject($subject) {
-		$this->setString('subject',  $subject);
-	}
-	
-	/** Returns the 'subject' parameter. */
-	public function getSubject() {
-		return $this->subject;
-	}
-	
-	/** Sets the 'to' parameter. */
-	public function setTo($to) {
-		$this->setString('to',  $to);
-	}
-	
-	/** Returns the 'to' parameter. */
-	public function getTo() {
-		return $this->to;
-	}
-
-	/** Enables or disables dry mode. */
-	public function setDry($dry) {
-		$this->setBoolean('dry', $dry);
-	}
-}


Mime
View raw message