logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject [19/43] LOG4PHP-121: Reorganized classes into namespaces
Date Thu, 28 Nov 2013 16:03:49 GMT
http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/filters/LoggerFilterLevelMatch.php
----------------------------------------------------------------------
diff --git a/src/main/php/filters/LoggerFilterLevelMatch.php b/src/main/php/filters/LoggerFilterLevelMatch.php
deleted file mode 100644
index cbd8950..0000000
--- a/src/main/php/filters/LoggerFilterLevelMatch.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.
- *
- * @package log4php
- */
-
-/**
- * This is a very simple filter based on level matching.
- *
- * <p>The filter admits two options <b><var>LevelToMatch</var></b> and
- * <b><var>AcceptOnMatch</var></b>. If there is an exact match between the value
- * of the <b><var>LevelToMatch</var></b> option and the level of the 
- * {@link LoggerLoggingEvent}, then the {@link decide()} method returns 
- * {@link LoggerFilter::ACCEPT} in case the <b><var>AcceptOnMatch</var></b> 
- * option value is set to <i>true</i>, if it is <i>false</i> then 
- * {@link LoggerFilter::DENY} is returned. If there is no match, 
- * {@link LoggerFilter::NEUTRAL} is returned.</p>
- * 
- * <p>
- * An example for this filter:
- * 
- * {@example ../../examples/php/filter_levelmatch.php 19}
- *
- * <p>
- * The corresponding XML file:
- * 
- * {@example ../../examples/resources/filter_levelmatch.xml 18}
- * 
- * @version $Revision$
- * @package log4php
- * @subpackage filters
- * @since 0.6
- */
-class LoggerFilterLevelMatch extends LoggerFilter {
-  
-	/** 
-	 * Indicates if this event should be accepted or denied on match
-	 * @var boolean
-	 */
-	protected $acceptOnMatch = true;
-
-	/**
-	 * The level, when to match
-	 * @var LoggerLevel
-	 */
-	protected $levelToMatch;
-  
-	/**
-	 * @param boolean $acceptOnMatch
-	 */
-	public function setAcceptOnMatch($acceptOnMatch) {
-		$this->setBoolean('acceptOnMatch', $acceptOnMatch);
-	}
-	
-	/**
-	 * @param string $l the level to match
-	 */
-	public function setLevelToMatch($level) {
-		$this->setLevel('levelToMatch', $level);
-	}
-
-	/**
-	 * Return the decision of this filter.
-	 * 
-	 * Returns {@link LoggerFilter::NEUTRAL} if the <b><var>LevelToMatch</var></b>
-	 * option is not set or if there is not match.	Otherwise, if there is a
-	 * match, then the returned decision is {@link LoggerFilter::ACCEPT} if the
-	 * <b><var>AcceptOnMatch</var></b> property is set to <i>true</i>. The
-	 * returned decision is {@link LoggerFilter::DENY} if the
-	 * <b><var>AcceptOnMatch</var></b> property is set to <i>false</i>.
-	 *
-	 * @param LoggerLoggingEvent $event
-	 * @return integer
-	 */
-	public function decide(LoggerLoggingEvent $event) {
-		if($this->levelToMatch === null) {
-			return LoggerFilter::NEUTRAL;
-		}
-		
-		if($this->levelToMatch->equals($event->getLevel())) {	
-			return $this->acceptOnMatch ? LoggerFilter::ACCEPT : LoggerFilter::DENY;
-		} else {
-			return LoggerFilter::NEUTRAL;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/filters/LoggerFilterLevelRange.php
----------------------------------------------------------------------
diff --git a/src/main/php/filters/LoggerFilterLevelRange.php b/src/main/php/filters/LoggerFilterLevelRange.php
deleted file mode 100644
index ff22b07..0000000
--- a/src/main/php/filters/LoggerFilterLevelRange.php
+++ /dev/null
@@ -1,138 +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 is a very simple filter based on level matching, which can be
- * used to reject messages with priorities outside a certain range.
- *	
- * <p>The filter admits three options <b><var>LevelMin</var></b>, <b><var>LevelMax</var></b>
- * and <b><var>AcceptOnMatch</var></b>.</p>
- *
- * <p>If the level of the {@link LoggerLoggingEvent} is not between Min and Max
- * (inclusive), then {@link LoggerFilter::DENY} is returned.</p>
- *	
- * <p>If the Logging event level is within the specified range, then if
- * <b><var>AcceptOnMatch</var></b> is <i>true</i>, 
- * {@link LoggerFilter::ACCEPT} is returned, and if
- * <b><var>AcceptOnMatch</var></b> is <i>false</i>, 
- * {@link LoggerFilter::NEUTRAL} is returned.</p>
- *	
- * <p>If <b><var>LevelMin</var></b> is not defined, then there is no
- * minimum acceptable level (i.e. a level is never rejected for
- * being too "low"/unimportant).  If <b><var>LevelMax</var></b> is not
- * defined, then there is no maximum acceptable level (ie a
- * level is never rejected for being too "high"/important).</p>
- *
- * <p>Refer to the {@link LoggerAppender::setThreshold()} method
- * available to <b>all</b> appenders extending {@link LoggerAppender} 
- * for a more convenient way to filter out events by level.</p>
- *
- * <p>
- * An example for this filter:
- * 
- * {@example ../../examples/php/filter_levelrange.php 19}
- *
- * <p>
- * The corresponding XML file:
- * 
- * {@example ../../examples/resources/filter_levelrange.xml 18}
- *
- * @author Simon Kitching
- * @author based on the org.apache.log4j.varia.LevelRangeFilte Java code by Ceki G&uuml;lc&uuml; 
- *
- * @version $Revision$
- * @package log4php
- * @subpackage filters
- * @since 0.6
- */
-class LoggerFilterLevelRange extends LoggerFilter {
-
-	/**
-	 * @var boolean
-	 */
-	protected $acceptOnMatch = true;
-
-	/**
-	 * @var LoggerLevel
-	 */
-	protected $levelMin;
-  
-	/**
-	 * @var LoggerLevel
-	 */
-	protected $levelMax;
-
-	/**
-	 * @param boolean $acceptOnMatch
-	 */
-	public function setAcceptOnMatch($acceptOnMatch) {
-		$this->setBoolean('acceptOnMatch', $acceptOnMatch); 
-	}
-	
-	/**
-	 * @param string $l the level min to match
-	 */
-	public function setLevelMin($level) {
-		$this->setLevel('levelMin', $level);
-	}
-
-	/**
-	 * @param string $l the level max to match
-	 */
-	public function setLevelMax($level) {
-		$this->setLevel('levelMax', $level);
-	}
-
-	/**
-	 * Return the decision of this filter.
-	 *
-	 * @param LoggerLoggingEvent $event
-	 * @return integer
-	 */
-	public function decide(LoggerLoggingEvent $event) {
-		$level = $event->getLevel();
-		
-		if($this->levelMin !== null) {
-			if($level->isGreaterOrEqual($this->levelMin) == false) {
-				// level of event is less than minimum
-				return LoggerFilter::DENY;
-			}
-		}
-
-		if($this->levelMax !== null) {
-			if($level->toInt() > $this->levelMax->toInt()) {
-				// level of event is greater than maximum
-				// Alas, there is no Level.isGreater method. and using
-				// a combo of isGreaterOrEqual && !Equal seems worse than
-				// checking the int values of the level objects..
-				return LoggerFilter::DENY;
-			}
-		}
-
-		if($this->acceptOnMatch) {
-			// this filter set up to bypass later filters and always return
-			// accept if level in range
-			return LoggerFilter::ACCEPT;
-		} else {
-			// event is ok for this filter; allow later filters to have a look..
-			return LoggerFilter::NEUTRAL;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/filters/LoggerFilterStringMatch.php
----------------------------------------------------------------------
diff --git a/src/main/php/filters/LoggerFilterStringMatch.php b/src/main/php/filters/LoggerFilterStringMatch.php
deleted file mode 100644
index 746f84d..0000000
--- a/src/main/php/filters/LoggerFilterStringMatch.php
+++ /dev/null
@@ -1,89 +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 is a very simple filter based on string matching.
- * 
- * <p>The filter admits two options {@link $stringToMatch} and
- * {@link $acceptOnMatch}. If there is a match (using {@link PHP_MANUAL#strpos}
- * between the value of the {@link $stringToMatch} option and the message 
- * of the {@link LoggerLoggingEvent},
- * then the {@link decide()} method returns {@link LoggerFilter::ACCEPT} if
- * the <b>AcceptOnMatch</b> option value is true, if it is false then
- * {@link LoggerFilter::DENY} is returned. If there is no match, {@link LoggerFilter::NEUTRAL}
- * is returned.</p>
- * 
- * <p>
- * An example for this filter:
- * 
- * {@example ../../examples/php/filter_stringmatch.php 19}
- *
- * <p>
- * The corresponding XML file:
- * 
- * {@example ../../examples/resources/filter_stringmatch.xml 18}
- *
- * @version $Revision$
- * @package log4php
- * @subpackage filters
- * @since 0.3
- */
-class LoggerFilterStringMatch extends LoggerFilter {
-
-	/**
-	 * @var boolean
-	 */
-	protected $acceptOnMatch = true;
-
-	/**
-	 * @var string
-	 */
-	protected $stringToMatch;
-
-	/**
-	 * @param mixed $acceptOnMatch a boolean or a string ('true' or 'false')
-	 */
-	public function setAcceptOnMatch($acceptOnMatch) {
-		$this->setBoolean('acceptOnMatch', $acceptOnMatch);
-	}
-	
-	/**
-	 * @param string $s the string to match
-	 */
-	public function setStringToMatch($string) {
-		$this->setString('stringToMatch', $string);
-	}
-
-	/**
-	 * @return integer a {@link LOGGER_FILTER_NEUTRAL} is there is no string match.
-	 */
-	public function decide(LoggerLoggingEvent $event) {
-		$msg = $event->getRenderedMessage();
-		
-		if($msg === null or $this->stringToMatch === null) {
-			return LoggerFilter::NEUTRAL;
-		}
-		
-		if(strpos($msg, $this->stringToMatch) !== false ) {
-			return ($this->acceptOnMatch) ? LoggerFilter::ACCEPT : LoggerFilter::DENY;
-		}
-		return LoggerFilter::NEUTRAL;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/helpers/LoggerFormattingInfo.php
----------------------------------------------------------------------
diff --git a/src/main/php/helpers/LoggerFormattingInfo.php b/src/main/php/helpers/LoggerFormattingInfo.php
deleted file mode 100644
index a8a54a6..0000000
--- a/src/main/php/helpers/LoggerFormattingInfo.php
+++ /dev/null
@@ -1,54 +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 encapsulates the information obtained when parsing
- * formatting modifiers in conversion modifiers.
- * 
- * @package log4php
- * @subpackage helpers
- * @since 0.3
- */
-class LoggerFormattingInfo {
-	
-	/** 
-	 * Minimal output length. If output is shorter than this value, it will be
-	 * padded with spaces. 
-	 */
-	public $min = 0;
-	
-	/** 
-	 * Maximum output length. If output is longer than this value, it will be 
-	 * trimmed.
-	 */
-	public $max = PHP_INT_MAX;
-	
-	/**
-	 * Whether to pad the string from the left. If set to false, the string 
-	 * will be padded from the right. 
-	 */
-	public $padLeft = true;
-	
-	/**
-	 * Whether to trim the string from the left. If set to false, the string
-	 * will be trimmed from the right.
-	 */
-	public $trimLeft = false;
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/helpers/LoggerOptionConverter.php
----------------------------------------------------------------------
diff --git a/src/main/php/helpers/LoggerOptionConverter.php b/src/main/php/helpers/LoggerOptionConverter.php
deleted file mode 100644
index a4ef554..0000000
--- a/src/main/php/helpers/LoggerOptionConverter.php
+++ /dev/null
@@ -1,226 +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
- */
-
-/**
- * A convenience class to convert property values to specific types.
- *
- * @version $Revision$ 
- * @package log4php
- * @subpackage helpers
- * @since 0.5
- */
-class LoggerOptionConverter {
-	
-	/** String values which are converted to boolean TRUE. */
-	private static $trueValues = array('1', 'true', 'yes', 'on');
-	
-	/** 
-	 * String values which are converted to boolean FALSE.
-	 * 
-	 * Note that an empty string must convert to false, because 
-	 * parse_ini_file() which is used for parsing configuration 
-	 * converts the value _false_ to an empty string.
-	 */
-	private static $falseValues = array('0', 'false', 'no', 'off', '');
-	
-	/**
-	 * Read a predefined var.
-	 *
-	 * It returns a value referenced by <var>$key</var> using this search criteria:
-	 * - if <var>$key</var> is a constant then return it. Else
-	 * - if <var>$key</var> is set in <var>$_ENV</var> then return it. Else
-	 * - return <var>$def</var>. 
-	 *
-	 * @param string $key The key to search for.
-	 * @param string $def The default value to return.
-	 * @return string	the string value of the system property, or the default
-	 *					value if there is no property with that key.
-	 */
-	public static function getSystemProperty($key, $def) {
-		if(defined($key)) {
-			return (string)constant($key);
-		} else if(isset($_SERVER[$key])) {
-			return (string)$_SERVER[$key];
-		} else if(isset($_ENV[$key])) {
-			return (string)$_ENV[$key];
-		} else {
-			return $def;
-		}
-	}
-
-	/** Converts $value to boolean, or throws an exception if not possible. */
-	public static function toBooleanEx($value) {
-		if (isset($value)) {
-			if (is_bool($value)) {
-				return $value;
-			}
-			$value = strtolower(trim($value));
-			if (in_array($value, self::$trueValues)) {
-				return true;
-			}
-			if (in_array($value, self::$falseValues)) {
-				return false;
-			}
-		}
-		
-		throw new LoggerException("Given value [" . var_export($value, true) . "] cannot be converted to boolean.");
-	}
-	
-	/** 
-	 * Converts $value to integer, or throws an exception if not possible. 
-	 * Floats cannot be converted to integer.
-	 */
-	public static function toIntegerEx($value) {
-		if (is_integer($value)) {
-			return $value;
-		}
-		if (is_numeric($value) && ($value == (integer) $value)) {
-			return (integer) $value;
-		}
-	
-		throw new LoggerException("Given value [" . var_export($value, true) . "] cannot be converted to integer.");
-	}
-	
-	/**
-	 * Converts $value to integer, or throws an exception if not possible.
-	 * Floats cannot be converted to integer.
-	 */
-	public static function toPositiveIntegerEx($value) {
-		if (is_integer($value) && $value > 0) {
-			return $value;
-		}
-		if (is_numeric($value) && ($value == (integer) $value) && $value > 0) {
-			return (integer) $value;
-		}
-	
-		throw new LoggerException("Given value [" . var_export($value, true) . "] cannot be converted to a positive integer.");
-	}
-
-	/** Converts the value to a level. Throws an exception if not possible. */
-	public static function toLevelEx($value) {
-		if ($value instanceof LoggerLevel) {
-			return $value;
-		}
-		$level = LoggerLevel::toLevel($value);
-		if ($level === null) {
-			throw new LoggerException("Given value [" . var_export($value, true) . "] cannot be converted to a logger level.");
-		}
-		return $level;
-	}
-
-	/**
-	 * Converts a value to a valid file size (integer).
-	 * 
-	 * Supports 'KB', 'MB' and 'GB' suffixes, where KB = 1024 B etc. 
-	 *
-	 * The final value will be rounded to the nearest integer.
-	 *
-	 * Examples:
-	 * - '100' => 100
-	 * - '100.12' => 100
-	 * - '100KB' => 102400
-	 * - '1.5MB' => 1572864
-	 * 
-	 * @param mixed $value File size (optionally with suffix).
-	 * @return integer Parsed file size.
-	 */
-	public static function toFileSizeEx($value) {
-		
-		if (empty($value)) {
-			throw new LoggerException("Empty value cannot be converted to a file size.");
-		}
-		
-		if (is_numeric($value)) {
-			return (integer) $value;
-		}
-		
-		if (!is_string($value)) {
-			throw new LoggerException("Given value [" . var_export($value, true) . "] cannot be converted to a file size.");
-		}
-		
-		$str = strtoupper(trim($value));
-		$count = preg_match('/^([0-9.]+)(KB|MB|GB)?$/', $str, $matches);
-		
-		if ($count > 0) {
-			$size = $matches[1];
-			$unit = $matches[2];
-			
-			switch($unit) {
-				case 'KB': $size *= pow(1024, 1); break;
-				case 'MB': $size *= pow(1024, 2); break;
-				case 'GB': $size *= pow(1024, 3); break;
-			}
-			
-			return (integer) $size;
-		}
-		
-		throw new LoggerException("Given value [$value] cannot be converted to a file size.");
-	}
-
-	/** 
-	 * Converts a value to string, or throws an exception if not possible. 
-	 * 
-	 * Objects can be converted to string if they implement the magic 
-	 * __toString() method.
-	 * 
-	 */
-	public static function toStringEx($value) {
-		if (is_string($value)) {
-			return $value;
-		}
-		if (is_numeric($value)) {
-			return (string) $value;
-		}
-		if (is_object($value) && method_exists($value, '__toString')) {
-			return (string) $value;
-		}
-	
-		throw new LoggerException("Given value [" . var_export($value, true) . "] cannot be converted to string.");
-	}
-	
-	/**
-	 * Performs value substitution for string options.
-	 * 
-	 * An option can contain PHP constants delimited by '${' and '}'.
-	 * 
-	 * E.g. for input string "some ${FOO} value", the method will attempt 
-	 * to substitute ${FOO} with the value of constant FOO if it exists.
-	 * 
-	 * Therefore, if FOO is a constant, and it has value "bar", the resulting 
-	 * string will be "some bar value". 
-	 * 
-	 * If the constant is not defined, it will be replaced by an empty string, 
-	 * and the resulting string will be "some  value". 
-	 * 
-	 * @param string $string String on which to perform substitution.
-	 * @return string
-	 */
-	public static function substConstants($string) {
-		preg_match_all('/\${([^}]+)}/', $string, $matches);
-		
-		foreach($matches[1] as $key => $match) {
-			$match = trim($match);
-			$search = $matches[0][$key];
-			$replacement = defined($match) ? constant($match) : '';
-			$string = str_replace($search, $replacement, $string);
-		}
-		return $string;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/helpers/LoggerPatternParser.php
----------------------------------------------------------------------
diff --git a/src/main/php/helpers/LoggerPatternParser.php b/src/main/php/helpers/LoggerPatternParser.php
deleted file mode 100644
index a2ed911..0000000
--- a/src/main/php/helpers/LoggerPatternParser.php
+++ /dev/null
@@ -1,237 +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
- */
-
-/**
- * Most of the work of the {@link LoggerPatternLayout} class 
- * is delegated to the {@link LoggerPatternParser} class.
- * 
- * <p>It is this class that parses conversion patterns and creates
- * a chained list of {@link LoggerPatternConverter} converters.</p>
- * 
- * @version $Revision$ 
- * @package log4php
- * @subpackage helpers
- *
- * @since 0.3
- */
-class LoggerPatternParser {
-
-	/** Escape character for conversion words in the conversion pattern. */
-	const ESCAPE_CHAR = '%';
-	
-	/** Maps conversion words to relevant converters. */
-	private $converterMap;
-	
-	/** Conversion pattern used in layout. */
-	private $pattern;
-	
-	/** Regex pattern used for parsing the conversion pattern. */
-	private $regex;
-	
-	/** 
-	 * First converter in the chain. 
-	 * @var LoggerPatternConverter
-	 */
-	private $head;
-	
-	/** Last converter in the chain. */
-	private $tail;
-	
-	public function __construct($pattern, $converterMap) {
-		$this->pattern = $pattern;
-		$this->converterMap = $converterMap;
-		
-		// Construct the regex pattern
-		$this->regex = 
-			'/' .                       // Starting regex pattern delimiter
-			self::ESCAPE_CHAR .         // Character which marks the start of the conversion pattern
-			'(?P<modifiers>[0-9.-]*)' . // Format modifiers (optional)
-			'(?P<word>[a-zA-Z]+)' .     // The conversion word
-			'(?P<option>{[^}]*})?' .    // Conversion option in braces (optional)
-			'/';                        // Ending regex pattern delimiter
-	}
-	
-	/** 
-	 * Parses the conversion pattern string, converts it to a chain of pattern
-	 * converters and returns the first converter in the chain.
-	 * 
-	 * @return LoggerPatternConverter
-	 */
-	public function parse() {
-		
-		// Skip parsing if the pattern is empty
-		if (empty($this->pattern)) {
-			$this->addLiteral('');
-			return $this->head;
-		}
-		
-		// Find all conversion words in the conversion pattern
-		$count = preg_match_all($this->regex, $this->pattern, $matches, PREG_OFFSET_CAPTURE);
-		if ($count === false) {
-			$error = error_get_last();
-			throw new LoggerException("Failed parsing layotut pattern: {$error['message']}");
-		}
-		
-		$prevEnd = 0;
-		
-		foreach($matches[0] as $key => $item) {
-			
-			// Locate where the conversion command starts and ends
-			$length = strlen($item[0]);
-			$start = $item[1];
-			$end = $item[1] + $length;
-		
-			// Find any literal expressions between matched commands
-			if ($start > $prevEnd) {
-				$literal = substr($this->pattern, $prevEnd, $start - $prevEnd);
-				$this->addLiteral($literal);
-			}
-			
-			// Extract the data from the matched command
-			$word = !empty($matches['word'][$key]) ? $matches['word'][$key][0] : null;
-			$modifiers = !empty($matches['modifiers'][$key]) ? $matches['modifiers'][$key][0] : null;
-			$option = !empty($matches['option'][$key]) ? $matches['option'][$key][0] : null;
-			
-			// Create a converter and add it to the chain
-			$this->addConverter($word, $modifiers, $option);
-			
-			$prevEnd = $end;
-		}
-
-		// Add any trailing literals
-		if ($end < strlen($this->pattern)) {
-			$literal = substr($this->pattern, $end);
-			$this->addLiteral($literal);
-		}
-		
-		return $this->head;
-	}
-	
-	/** 
-	 * Adds a literal converter to the converter chain. 
-	 * @param string $string The string for the literal converter.
-	 */
-	private function addLiteral($string) {
-		$converter = new LoggerPatternConverterLiteral($string);
-		$this->addToChain($converter);
-	}
-	
-	/**
-	 * Adds a non-literal converter to the converter chain.
-	 * 
-	 * @param string $word The conversion word, used to determine which 
-	 *  converter will be used.
-	 * @param string $modifiers Formatting modifiers.
-	 * @param string $option Option to pass to the converter.
-	 */
-	private function addConverter($word, $modifiers, $option) {
- 		$formattingInfo = $this->parseModifiers($modifiers);
-		$option = trim($option, "{} ");
-		
-		if (isset($this->converterMap[$word])) {
-			$converter = $this->getConverter($word, $formattingInfo, $option);
-			$this->addToChain($converter);	
-		} else {
-			trigger_error("log4php: Invalid keyword '%$word' in converison pattern. Ignoring keyword.", E_USER_WARNING);
-		}
-	}
-	
-	/**
-	 * Determines which converter to use based on the conversion word. Creates 
-	 * an instance of the converter using the provided formatting info and 
-	 * option and returns it.
-	 * 
-	 * @param string $word The conversion word.
-	 * @param LoggerFormattingInfo $info Formatting info.
-	 * @param string $option Converter option.
-	 * 
-	 * @throws LoggerException 
-	 * 
-	 * @return LoggerPatternConverter
-	 */
-	private function getConverter($word, $info, $option) {
-		if (!isset($this->converterMap[$word])) {
-			throw new LoggerException("Invalid keyword '%$word' in converison pattern. Ignoring keyword.");
-		}
-		
-		$converterClass = $this->converterMap[$word];
-		if(!class_exists($converterClass)) {
-			throw new LoggerException("Class '$converterClass' does not exist.");
-		}
-		
-		$converter = new $converterClass($info, $option);
-		if(!($converter instanceof LoggerPatternConverter)) {
-			throw new LoggerException("Class '$converterClass' is not an instance of LoggerPatternConverter.");
-		}
-		
-		return $converter;
-	}
-	
-	/** Adds a converter to the chain and updates $head and $tail pointers. */
-	private function addToChain(LoggerPatternConverter $converter) {
-		if (!isset($this->head)) {
-			$this->head = $converter;
-			$this->tail = $this->head;
-		} else {
-			$this->tail->next = $converter;
-			$this->tail = $this->tail->next;
-		}
-	}
-	
-	/**
-	 * Parses the formatting modifiers and produces the corresponding 
-	 * LoggerFormattingInfo object.
-	 * 
-	 * @param string $modifier
-	 * @return LoggerFormattingInfo
-	 * @throws LoggerException
-	 */
-	private function parseModifiers($modifiers) {
-		$info = new LoggerFormattingInfo();
-	
-		// If no modifiers are given, return default values
-		if (empty($modifiers)) {
-			return $info;
-		}
-	
-		// Validate
-		$pattern = '/^(-?[0-9]+)?\.?-?[0-9]+$/';
-		if (!preg_match($pattern, $modifiers)) {
-			trigger_error("log4php: Invalid modifier in conversion pattern: [$modifiers]. Ignoring modifier.", E_USER_WARNING);
-			return $info;
-		}
-	
-		$parts = explode('.', $modifiers);
-	
-		if (!empty($parts[0])) {
-			$minPart = (integer) $parts[0];
-			$info->min = abs($minPart);
-			$info->padLeft = ($minPart > 0);
-		}
-	
-		if (!empty($parts[1])) {
-			$maxPart = (integer) $parts[1];
-			$info->max = abs($maxPart);
-			$info->trimLeft = ($maxPart < 0);
-		}
-	
-		return $info;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/helpers/LoggerUtils.php
----------------------------------------------------------------------
diff --git a/src/main/php/helpers/LoggerUtils.php b/src/main/php/helpers/LoggerUtils.php
deleted file mode 100644
index bc7366e..0000000
--- a/src/main/php/helpers/LoggerUtils.php
+++ /dev/null
@@ -1,123 +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
- */
-
-/**
- * Contains various helper methods.
- * 
- * @package log4php
- * @subpackage helpers
- * @since 2.3
- */
-class LoggerUtils {
-	
-	/**
- 	 * Splits a fully qualified class name into fragments delimited by the 
- 	 * namespace separator (\). 
- 	 * 
- 	 * For backward compatibility, a dot (.) can be used as a delimiter as
- 	 * well. 
-	 * 
-	 * @param string $name
-	 * 
-	 * @return array Class name split into fragments.
-	 */
-	public static function tokenizeClassName($name) {
-		$name = str_replace('.', '\\', $name);
-		$name = trim($name, ' \\');
-		$fragments = explode('\\', $name);
-		
-		foreach($fragments as $key => $fragment) {
-			if (trim($fragment) === '') {
-				unset($fragments[$key]);
-			}
-		}
-		
-		return $fragments;
-	}
-	
-	/**
-	 * Attempts to shorten the given class name to the desired length.
-	 * 
-	 * This is done by separating the class name into fragments (delimited
-	 * by \ or .) and trimming individual fragments, starting with the left,
-	 * until desired length has been reached. 
-	 * 
-	 * The final fragment (i.e. class name) will never be shortened so the 
-	 * result may still be longer than given length.
-	 * 
-	 * @param string $name The (qualified) class name.  
-	 * @param integer $length The length to shorten to. If null or 0 is given,
-	 * the name will be returned without shortening. 
-	 */
-	public static function shortenClassName($name, $length) {
-		if ($length === null || $length < 0) {
-			return $name;
-		}
-		
-		$name = str_replace('.', '\\', $name);
-		$name = trim($name, ' \\');
-		
-		// Check if any shortening is required
-		$currentLength = strlen($name);
-		if ($currentLength <= $length) {
-			return $name;
-		}
-	
-		// Split name into fragments
-		$fragments = explode('\\', $name);
-
-		// If zero length is specified, return only last fragment
-		if ($length == 0) {
-			return array_pop($fragments);
-		}
-		
-		// If the name splits to only one fragment, then it cannot be shortened
-		$count = count($fragments);
-		if ($count == 1) {
-			return $name;
-		}
-	
-		foreach($fragments as $key => &$fragment) {
-	
-			// Never shorten last fragment
-			if ($key == $count - 1) {
-				break;
-			}
-	
-			// Check for empty fragments (shouldn't happen but it's possible)
-			$fragLen = strlen($fragment);
-			if ($fragLen <= 1) {
-				continue;
-			}
-	
-			// Shorten fragment to one character and check if total length satisfactory
-			$fragment = substr($fragment, 0, 1);
-			$currentLength = $currentLength - $fragLen + 1;
-	
-			if ($currentLength <= $length) {
-				break;
-			}
-		}
-		unset($fragment);
-	
-		return implode('\\', $fragments);
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/layouts/LoggerLayoutHtml.php
----------------------------------------------------------------------
diff --git a/src/main/php/layouts/LoggerLayoutHtml.php b/src/main/php/layouts/LoggerLayoutHtml.php
deleted file mode 100644
index ea2769b..0000000
--- a/src/main/php/layouts/LoggerLayoutHtml.php
+++ /dev/null
@@ -1,214 +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 layout outputs events in a HTML table.
- *
- * Configurable parameters for this layout are:
- * 
- * - title
- * - locationInfo
- *
- * An example for this layout:
- * 
- * {@example ../../examples/php/layout_html.php 19}<br>
- * 
- * The corresponding XML file:
- * 
- * {@example ../../examples/resources/layout_html.properties 18}
- * 
- * The above will print a HTML table that looks, converted back to plain text, like the following:<br>
- * <pre>
- *    Log session start time Wed Sep 9 00:11:30 2009
- *
- *    Time Thread Level Category   Message
- *    0    8318   INFO  root       Hello World!
- * </pre>
- * 
- * @version $Revision$
- * @package log4php
- * @subpackage layouts
- */
-class LoggerLayoutHtml extends LoggerLayout {
-	/**
-	 * The <b>LocationInfo</b> option takes a boolean value. By
-	 * default, it is set to false which means there will be no location
-	 * information output by this layout. If the the option is set to
-	 * true, then the file name and line number of the statement
-	 * at the origin of the log statement will be output.
-	 *
-	 * <p>If you are embedding this layout within a {@link LoggerAppenderMail}
-	 * or a {@link LoggerAppenderMailEvent} then make sure to set the
-	 * <b>LocationInfo</b> option of that appender as well.
-	 * @var boolean
-	 */
-	protected $locationInfo = false;
-	
-	/**
-	 * The <b>Title</b> option takes a String value. This option sets the
-	 * document title of the generated HTML document.
-	 * Defaults to 'Log4php Log Messages'.
-	 * @var string
-	 */
-	protected $title = "Log4php Log Messages";
-	
-	/**
-	 * The <b>LocationInfo</b> option takes a boolean value. By
-	 * default, it is set to false which means there will be no location
-	 * information output by this layout. If the the option is set to
-	 * true, then the file name and line number of the statement
-	 * at the origin of the log statement will be output.
-	 *
-	 * <p>If you are embedding this layout within a {@link LoggerAppenderMail}
-	 * or a {@link LoggerAppenderMailEvent} then make sure to set the
-	 * <b>LocationInfo</b> option of that appender as well.
-	 */
-	public function setLocationInfo($flag) {
-		$this->setBoolean('locationInfo', $flag);
-	}
-
-	/**
-	 * Returns the current value of the <b>LocationInfo</b> option.
-	 */
-	public function getLocationInfo() {
-		return $this->locationInfo;
-	}
-	
-	/**
-	 * The <b>Title</b> option takes a String value. This option sets the
-	 * document title of the generated HTML document.
-	 * Defaults to 'Log4php Log Messages'.
-	 */
-	public function setTitle($title) {
-		$this->setString('title', $title);
-	}
-
-	/**
-	 * @return string Returns the current value of the <b>Title</b> option.
-	 */
-	public function getTitle() {
-		return $this->title;
-	}
-	
-	/**
-	 * @return string Returns the content type output by this layout, i.e "text/html".
-	 */
-	public function getContentType() {
-		return "text/html";
-	}
-	
-	/**
-	 * @param LoggerLoggingEvent $event
-	 * @return string
-	 */
-	public function format(LoggerLoggingEvent $event) {
-		$sbuf = PHP_EOL . "<tr>" . PHP_EOL;
-	
-		$sbuf .= "<td>";
-		$sbuf .= round(1000 * $event->getRelativeTime());
-		$sbuf .= "</td>" . PHP_EOL;
-	
-		$sbuf .= "<td title=\"" . $event->getThreadName() . " thread\">";
-		$sbuf .= $event->getThreadName();
-		$sbuf .= "</td>" . PHP_EOL;
-	
-		$sbuf .= "<td title=\"Level\">";
-		
-		$level = $event->getLevel();
-		
-		if ($level->equals(LoggerLevel::getLevelDebug())) {
-			$sbuf .= "<font color=\"#339933\">$level</font>";
-		} else if ($level->equals(LoggerLevel::getLevelWarn())) {
-			$sbuf .= "<font color=\"#993300\"><strong>$level</strong></font>";
-		} else {
-			$sbuf .= $level;
-		}
-		$sbuf .= "</td>" . PHP_EOL;
-	
-		$sbuf .= "<td title=\"" . htmlentities($event->getLoggerName(), ENT_QUOTES) . " category\">";
-		$sbuf .= htmlentities($event->getLoggerName(), ENT_QUOTES);
-		$sbuf .= "</td>" . PHP_EOL;
-	
-		if ($this->locationInfo) {
-			$locInfo = $event->getLocationInformation();
-			$sbuf .= "<td>";
-			$sbuf .= htmlentities($locInfo->getFileName(), ENT_QUOTES). ':' . $locInfo->getLineNumber();
-			$sbuf .= "</td>" . PHP_EOL;
-		}
-
-		$sbuf .= "<td title=\"Message\">";
-		$sbuf .= htmlentities($event->getRenderedMessage(), ENT_QUOTES);
-		$sbuf .= "</td>" . PHP_EOL;
-
-		$sbuf .= "</tr>" . PHP_EOL;
-		
-		if ($event->getNDC() != null) {
-			$sbuf .= "<tr><td bgcolor=\"#EEEEEE\" style=\"font-size : xx-small;\" colspan=\"6\" title=\"Nested Diagnostic Context\">";
-			$sbuf .= "NDC: " . htmlentities($event->getNDC(), ENT_QUOTES);
-			$sbuf .= "</td></tr>" . PHP_EOL;
-		}
-		return $sbuf;
-	}
-
-	/**
-	 * @return string Returns appropriate HTML headers.
-	 */
-	public function getHeader() {
-		$sbuf = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" . PHP_EOL;
-		$sbuf .= "<html>" . PHP_EOL;
-		$sbuf .= "<head>" . PHP_EOL;
-		$sbuf .= "<title>" . $this->title . "</title>" . PHP_EOL;
-		$sbuf .= "<style type=\"text/css\">" . PHP_EOL;
-		$sbuf .= "<!--" . PHP_EOL;
-		$sbuf .= "body, table {font-family: arial,sans-serif; font-size: x-small;}" . PHP_EOL;
-		$sbuf .= "th {background: #336699; color: #FFFFFF; text-align: left;}" . PHP_EOL;
-		$sbuf .= "-->" . PHP_EOL;
-		$sbuf .= "</style>" . PHP_EOL;
-		$sbuf .= "</head>" . PHP_EOL;
-		$sbuf .= "<body bgcolor=\"#FFFFFF\" topmargin=\"6\" leftmargin=\"6\">" . PHP_EOL;
-		$sbuf .= "<hr size=\"1\" noshade>" . PHP_EOL;
-		$sbuf .= "Log session start time " . strftime('%c', time()) . "<br>" . PHP_EOL;
-		$sbuf .= "<br>" . PHP_EOL;
-		$sbuf .= "<table cellspacing=\"0\" cellpadding=\"4\" border=\"1\" bordercolor=\"#224466\" width=\"100%\">" . PHP_EOL;
-		$sbuf .= "<tr>" . PHP_EOL;
-		$sbuf .= "<th>Time</th>" . PHP_EOL;
-		$sbuf .= "<th>Thread</th>" . PHP_EOL;
-		$sbuf .= "<th>Level</th>" . PHP_EOL;
-		$sbuf .= "<th>Category</th>" . PHP_EOL;
-		if ($this->locationInfo) {
-			$sbuf .= "<th>File:Line</th>" . PHP_EOL;
-		}
-		$sbuf .= "<th>Message</th>" . PHP_EOL;
-		$sbuf .= "</tr>" . PHP_EOL;
-
-		return $sbuf;
-	}
-
-	/**
-	 * @return string Returns the appropriate HTML footers.
-	 */
-	public function getFooter() {
-		$sbuf = "</table>" . PHP_EOL;
-		$sbuf .= "<br>" . PHP_EOL;
-		$sbuf .= "</body></html>";
-
-		return $sbuf;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/layouts/LoggerLayoutPattern.php
----------------------------------------------------------------------
diff --git a/src/main/php/layouts/LoggerLayoutPattern.php b/src/main/php/layouts/LoggerLayoutPattern.php
deleted file mode 100644
index 0467d18..0000000
--- a/src/main/php/layouts/LoggerLayoutPattern.php
+++ /dev/null
@@ -1,171 +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
- */
-
-/**
- * A flexible layout configurable with a pattern string.
- * 
- * Configurable parameters:
- * 
- * * converionPattern - A string which controls the formatting of logging 
- *   events. See docs for full specification.
- * 
- * @package log4php
- * @subpackage layouts
- * @version $Revision$
- */
-class LoggerLayoutPattern extends LoggerLayout {
-	
-	/** Default conversion pattern */
-	const DEFAULT_CONVERSION_PATTERN = '%date %-5level %logger %message%newline';
-
-	/** Default conversion TTCC Pattern */
-	const TTCC_CONVERSION_PATTERN = '%d [%t] %p %c %x - %m%n';
-
-	/** The conversion pattern. */ 
-	protected $pattern = self::DEFAULT_CONVERSION_PATTERN;
-	
-	/** Maps conversion keywords to the relevant converter (default implementation). */
-	protected static $defaultConverterMap = array(
-		'c' => 'LoggerPatternConverterLogger',
-		'lo' => 'LoggerPatternConverterLogger',
-		'logger' => 'LoggerPatternConverterLogger',
-		
-		'C' => 'LoggerPatternConverterClass',
-		'class' => 'LoggerPatternConverterClass',
-		
-		'cookie' => 'LoggerPatternConverterCookie',
-		
-		'd' => 'LoggerPatternConverterDate',
-		'date' => 'LoggerPatternConverterDate',
-		
-		'e' => 'LoggerPatternConverterEnvironment',
-		'env' => 'LoggerPatternConverterEnvironment',
-		
-		'ex' => 'LoggerPatternConverterThrowable',
-		'exception' => 'LoggerPatternConverterThrowable',
-		'throwable' => 'LoggerPatternConverterThrowable',
-		
-		'F' => 'LoggerPatternConverterFile',
-		'file' => 'LoggerPatternConverterFile',
-			
-		'l' => 'LoggerPatternConverterLocation',
-		'location' => 'LoggerPatternConverterLocation',
-		
-		'L' => 'LoggerPatternConverterLine',
-		'line' => 'LoggerPatternConverterLine',
-		
-		'm' => 'LoggerPatternConverterMessage',
-		'msg' => 'LoggerPatternConverterMessage',
-		'message' => 'LoggerPatternConverterMessage',
-		
-		'M' => 'LoggerPatternConverterMethod',
-		'method' => 'LoggerPatternConverterMethod',
-		
-		'n' => 'LoggerPatternConverterNewLine',
-		'newline' => 'LoggerPatternConverterNewLine',
-		
-		'p' => 'LoggerPatternConverterLevel',
-		'le' => 'LoggerPatternConverterLevel',
-		'level' => 'LoggerPatternConverterLevel',
-	
-		'r' => 'LoggerPatternConverterRelative',
-		'relative' => 'LoggerPatternConverterRelative',
-		
-		'req' => 'LoggerPatternConverterRequest',
-		'request' => 'LoggerPatternConverterRequest',
-		
-		's' => 'LoggerPatternConverterServer',
-		'server' => 'LoggerPatternConverterServer',
-		
-		'ses' => 'LoggerPatternConverterSession',
-		'session' => 'LoggerPatternConverterSession',
-		
-		'sid' => 'LoggerPatternConverterSessionID',
-		'sessionid' => 'LoggerPatternConverterSessionID',
-	
-		't' => 'LoggerPatternConverterProcess',
-		'pid' => 'LoggerPatternConverterProcess',
-		'process' => 'LoggerPatternConverterProcess',
-		
-		'x' => 'LoggerPatternConverterNDC',
-		'ndc' => 'LoggerPatternConverterNDC',
-			
-		'X' => 'LoggerPatternConverterMDC',
-		'mdc' => 'LoggerPatternConverterMDC',
-	);
-
-	/** Maps conversion keywords to the relevant converter. */
-	protected $converterMap = array();
-	
-	/** 
-	 * Head of a chain of Converters.
-	 * @var LoggerPatternConverter 
-	 */
-	private $head;
-
-	/** Returns the default converter map. */
-	public static function getDefaultConverterMap() {
-		return self::$defaultConverterMap;
-	}
-	
-	/** Constructor. Initializes the converter map. */
-	public function __construct() {
-		$this->converterMap = self::$defaultConverterMap;
-	}
-	
-	/**
-	 * Sets the conversionPattern option. This is the string which
-	 * controls formatting and consists of a mix of literal content and
-	 * conversion specifiers.
-	 * @param array $conversionPattern
-	 */
-	public function setConversionPattern($conversionPattern) {
-		$this->pattern = $conversionPattern;
-	}
-	
-	/**
-	 * Processes the conversion pattern and creates a corresponding chain of 
-	 * pattern converters which will be used to format logging events. 
-	 */
-	public function activateOptions() {
-		if (!isset($this->pattern)) {
-			throw new LoggerException("Mandatory parameter 'conversionPattern' is not set.");
-		}
-		
-		$parser = new LoggerPatternParser($this->pattern, $this->converterMap);
-		$this->head = $parser->parse();
-	}
-	
-	/**
-	 * Produces a formatted string as specified by the conversion pattern.
-	 *
-	 * @param LoggerLoggingEvent $event
-	 * @return string
-	 */
-	public function format(LoggerLoggingEvent $event) {
-		$sbuf = '';
-		$converter = $this->head;
-		while ($converter !== null) {
-			$converter->format($sbuf, $event);
-			$converter = $converter->next;
-		}
-		return $sbuf;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/layouts/LoggerLayoutSerialized.php
----------------------------------------------------------------------
diff --git a/src/main/php/layouts/LoggerLayoutSerialized.php b/src/main/php/layouts/LoggerLayoutSerialized.php
deleted file mode 100644
index bf754b8..0000000
--- a/src/main/php/layouts/LoggerLayoutSerialized.php
+++ /dev/null
@@ -1,55 +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
- */
-
-/**
- * Layout which formats the events using PHP's serialize() function.
- * 
- * Available options:
- * - locationInfo - If set to true, the event's location information will also
- *                  be serialized (slow, defaults to false).
- * 
- * @version $Revision$
- * @package log4php
- * @subpackage layouts
- * @since 2.2
- */  
-class LoggerLayoutSerialized extends LoggerLayout {
-	
-	/** Whether to include the event's location information (slow). */
-	protected $locationInfo = false;
-	
-	/** Sets the location information flag. */
-	public function setLocationInfo($value) {
-		$this->setBoolean('locationInfo', $value);
-	}
-	
-	/** Returns the location information flag. */
-	public function getLocationInfo() {
-		return $this->locationInfo;
-	}
-	
-	public function format(LoggerLoggingEvent $event) {
-		// If required, initialize the location data
-		if($this->locationInfo) {
-			$event->getLocationInformation();
-		}
-		return serialize($event) . PHP_EOL;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/layouts/LoggerLayoutSimple.php
----------------------------------------------------------------------
diff --git a/src/main/php/layouts/LoggerLayoutSimple.php b/src/main/php/layouts/LoggerLayoutSimple.php
deleted file mode 100644
index 26f3d3c..0000000
--- a/src/main/php/layouts/LoggerLayoutSimple.php
+++ /dev/null
@@ -1,56 +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
- */
-
-/**
- * A simple layout.
- *
- * Returns the log statement in a format consisting of the
- * <b>level</b>, followed by " - " and then the <b>message</b>. 
- *
- * For example the following php and properties files
- * 
- * {@example ../../examples/php/layout_simple.php 19}<br>
- * 
- * {@example ../../examples/resources/layout_simple.properties 18}<br>
- *
- * would result in:
- * 
- * <samp>INFO - Hello World!</samp>
- *
- * @version $Revision$
- * @package log4php
- * @subpackage layouts
- */  
-class LoggerLayoutSimple extends LoggerLayout {
-	/**
-	 * Returns the log statement in a format consisting of the
-	 * <b>level</b>, followed by " - " and then the
-	 * <b>message</b>. For example, 
-	 * <samp> INFO - "A message" </samp>
-	 *
-	 * @param LoggerLoggingEvent $event
-	 * @return string
-	 */
-	public function format(LoggerLoggingEvent $event) {
-		$level = $event->getLevel();
-		$message = $event->getRenderedMessage();
-		return "$level - $message" . PHP_EOL;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/layouts/LoggerLayoutTTCC.php
----------------------------------------------------------------------
diff --git a/src/main/php/layouts/LoggerLayoutTTCC.php b/src/main/php/layouts/LoggerLayoutTTCC.php
deleted file mode 100644
index e49d844..0000000
--- a/src/main/php/layouts/LoggerLayoutTTCC.php
+++ /dev/null
@@ -1,201 +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
- */
-
-/**
- * TTCC layout format consists of <b>t</b>ime, <b>t</b>hread, <b>c</b>ategory and nested
- * diagnostic <b>c</b>ontext information, hence the name.
- * 
- * <p>Each of the four fields can be individually enabled or
- * disabled. The time format depends on the <b>DateFormat</b> used.</p>
- *
- * <p>If no dateFormat is specified it defaults to '%c'. 
- * See php {@link PHP_MANUAL#date} function for details.</p>
- *
- * Configurable parameters for this layout are:
- * - {@link $threadPrinting} (true|false) enable/disable pid reporting.
- * - {@link $categoryPrefixing} (true|false) enable/disable logger category reporting.
- * - {@link $contextPrinting} (true|false) enable/disable NDC reporting.
- * - {@link $microSecondsPrinting} (true|false) enable/disable micro seconds reporting in timestamp.
- * - {@link $dateFormat} (string) set date format. See php {@link PHP_MANUAL#date} function for details.
- *
- * An example how to use this layout:
- * 
- * {@example ../../examples/php/layout_ttcc.php 19}<br>
- * 
- * {@example ../../examples/resources/layout_ttcc.properties 18}<br>
- *
- * The above would print:<br>
- * <samp>02:28 [13714] INFO root - Hello World!</samp>
- *
- * @version $Revision$
- * @package log4php
- * @subpackage layouts
- * 
- * @deprecated LoggerLayout TTCC is deprecated and will be removed in a future release. Please use 
- *   LoggerLayoutPattern instead. 
- */
-class LoggerLayoutTTCC extends LoggerLayout {
-
-	// Internal representation of options
-	protected $threadPrinting    = true;
-	protected $categoryPrefixing = true;
-	protected $contextPrinting   = true;
-	protected $microSecondsPrinting = true;
-	
-	/**
-	 * @var string date format. See {@link PHP_MANUAL#strftime} for details
-	 */
-	protected $dateFormat = '%c';
-
-	/**
-	 * Constructor
-	 *
-	 * @param string date format
-	 * @see dateFormat
-	 */
-	public function __construct($dateFormat = '') {
-		$this->warn("LoggerLayout TTCC is deprecated and will be removed in a future release. Please use LoggerLayoutPattern instead.");
-		if (!empty($dateFormat)) {
-			$this->dateFormat = $dateFormat;
-		}
-		return;
-	}
-
-	/**
-	 * The <b>ThreadPrinting</b> option specifies whether the name of the
-	 * current thread is part of log output or not. This is true by default.
-	 */
-	public function setThreadPrinting($threadPrinting) {
-		$this->setBoolean('threadPrinting', $threadPrinting);
-	}
-
-	/**
-	 * @return boolean Returns value of the <b>ThreadPrinting</b> option.
-	 */
-	public function getThreadPrinting() {
-		return $this->threadPrinting;
-	}
-
-	/**
-	 * The <b>CategoryPrefixing</b> option specifies whether {@link Category}
-	 * name is part of log output or not. This is true by default.
-	 */
-	public function setCategoryPrefixing($categoryPrefixing) {
-		$this->setBoolean('categoryPrefixing', $categoryPrefixing);
-	}
-
-	/**
-	 * @return boolean Returns value of the <b>CategoryPrefixing</b> option.
-	 */
-	public function getCategoryPrefixing() {
-		return $this->categoryPrefixing;
-	}
-
-	/**
-	 * The <b>ContextPrinting</b> option specifies log output will include
-	 * the nested context information belonging to the current thread.
-	 * This is true by default.
-	 */
-	public function setContextPrinting($contextPrinting) {
-		$this->setBoolean('contextPrinting', $contextPrinting);
-	}
-
-	/**
-	 * @return boolean Returns value of the <b>ContextPrinting</b> option.
-	 */
-	public function getContextPrinting() {
-		return $this->contextPrinting;
-	}
-	
-	/**
-	 * The <b>MicroSecondsPrinting</b> option specifies if microseconds infos
-	 * should be printed at the end of timestamp.
-	 * This is true by default.
-	 */
-	public function setMicroSecondsPrinting($microSecondsPrinting) {
-		$this->setBoolean('microSecondsPrinting', $microSecondsPrinting);
-	}
-
-	/**
-	 * @return boolean Returns value of the <b>MicroSecondsPrinting</b> option.
-	 */
-	public function getMicroSecondsPrinting() {
-		return $this->microSecondsPrinting;
-	}
-	
-	
-	public function setDateFormat($dateFormat) {
-		$this->setString('dateFormat', $dateFormat);
-	}
-	
-	/**
-	 * @return string
-	 */
-	public function getDateFormat() {
-		return $this->dateFormat;
-	}
-
-	/**
-	 * In addition to the level of the statement and message, the
-	 * returned string includes time, thread, category.
-	 * <p>Time, thread, category are printed depending on options.
-	 *
-	 * @param LoggerLoggingEvent $event
-	 * @return string
-	 */
-	public function format(LoggerLoggingEvent $event) {
-		$timeStamp = (float)$event->getTimeStamp();
-		$format = strftime($this->dateFormat, (int)$timeStamp);
-		
-		if ($this->microSecondsPrinting) {
-			$usecs = floor(($timeStamp - (int)$timeStamp) * 1000);
-			$format .= sprintf(',%03d', $usecs);
-		}
-			
-		$format .= ' ';
-		
-		if ($this->threadPrinting) {
-			$format .= '['.getmypid().'] ';
-		}
-		
-		$level = $event->getLevel();
-		$format .= $level.' ';
-		
-		if($this->categoryPrefixing) {
-			$format .= $event->getLoggerName().' ';
-		}
-	   
-		if($this->contextPrinting) {
-			$ndc = $event->getNDC();
-			if($ndc != null) {
-				$format .= $ndc.' ';
-			}
-		}
-		
-		$format .= '- '.$event->getRenderedMessage();
-		$format .= PHP_EOL;
-		
-		return $format;
-	}
-
-	public function ignoresThrowable() {
-		return true;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/layouts/LoggerLayoutXml.php
----------------------------------------------------------------------
diff --git a/src/main/php/layouts/LoggerLayoutXml.php b/src/main/php/layouts/LoggerLayoutXml.php
deleted file mode 100644
index 2c17def..0000000
--- a/src/main/php/layouts/LoggerLayoutXml.php
+++ /dev/null
@@ -1,210 +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 output of the LoggerXmlLayout consists of a series of log4php:event elements. 
- * 
- * Configurable parameters: 
- * - {@link $locationInfo} - If set to true then the file name and line number 
- *   of the origin of the log statement will be included in output.
- * - {@link $log4jNamespace} - If set to true then log4j namespace will be used
- *   instead of log4php namespace. This can be usefull when using log viewers 
- *   which can only parse the log4j namespace such as Apache Chainsaw. 
- * 
- * <p>It does not output a complete well-formed XML file. 
- * The output is designed to be included as an external entity in a separate file to form
- * a correct XML file.</p>
- * 
- * Example:
- * 
- * {@example ../../examples/php/layout_xml.php 19}<br>
- * 
- * {@example ../../examples/resources/layout_xml.properties 18}<br>
- *
- * The above would print:
- * 
- * <pre>
- * <log4php:eventSet xmlns:log4php="http://logging.apache.org/log4php/" version="0.3" includesLocationInfo="true">
- * 	<log4php:event logger="root" level="INFO" thread="13802" timestamp="1252456226491">
- * 		<log4php:message><![CDATA[Hello World!]]></log4php:message>
- * 		<log4php:locationInfo class="main" file="examples/php/layout_xml.php" line="6" method="main" />
- * 	</log4php:event>
- * </log4php:eventSet>
- * </pre>
- *
- * @version $Revision$
- * @package log4php
- * @subpackage layouts
- */
-class LoggerLayoutXml extends LoggerLayout {
-	const LOG4J_NS_PREFIX ='log4j';
-	const LOG4J_NS = 'http://jakarta.apache.org/log4j/';
-	
-	const LOG4PHP_NS_PREFIX = 'log4php';
-	const LOG4PHP_NS = 'http://logging.apache.org/log4php/';
-	
-	const CDATA_START = '<![CDATA[';
-	const CDATA_END = ']]>';
-	const CDATA_PSEUDO_END = ']]&gt;';
-	const CDATA_EMBEDDED_END = ']]>]]&gt;<![CDATA[';
-
-	/**
-	 * If set to true then the file name and line number of the origin of the
-	 * log statement will be output.
-	 * @var boolean
-	 */
-	protected $locationInfo = true;
-  
-	/**
-	 * If set to true, log4j namespace will be used instead of the log4php 
-	 * namespace.
-	 * @var boolean 
-	 */
-	protected $log4jNamespace = false;
-	
-	/** The namespace in use. */
-	protected $namespace = self::LOG4PHP_NS;
-	
-	/** The namespace prefix in use */
-	protected $namespacePrefix = self::LOG4PHP_NS_PREFIX;
-	 
-	public function activateOptions() {
-		if ($this->getLog4jNamespace()) {
-			$this->namespace        = self::LOG4J_NS;
-			$this->namespacePrefix  = self::LOG4J_NS_PREFIX;
-		} else {
-			$this->namespace        = self::LOG4PHP_NS;
-			$this->namespacePrefix  = self::LOG4PHP_NS_PREFIX;
-		}
-	}
-	
-	/**
-	 * @return string
-	 */
-	public function getHeader() {
-		return "<{$this->namespacePrefix}:eventSet ".
-			"xmlns:{$this->namespacePrefix}=\"{$this->namespace}\" ".
-			"version=\"0.3\" ".
-			"includesLocationInfo=\"".($this->getLocationInfo() ? "true" : "false")."\"".
-			">" . PHP_EOL;
-	}
-
-	/**
-	 * Formats a {@link LoggerLoggingEvent} in conformance with the log4php.dtd.
-	 *
-	 * @param LoggerLoggingEvent $event
-	 * @return string
-	 */
-	public function format(LoggerLoggingEvent $event) {
-		$ns = $this->namespacePrefix;
-		
-		$loggerName = $event->getLoggerName();
-		$timeStamp = number_format((float)($event->getTimeStamp() * 1000), 0, '', '');
-		$thread = $event->getThreadName();
-		$level = $event->getLevel()->toString();
-
-		$buf  = "<$ns:event logger=\"{$loggerName}\" level=\"{$level}\" thread=\"{$thread}\" timestamp=\"{$timeStamp}\">".PHP_EOL;
-		$buf .= "<$ns:message>"; 
-		$buf .= $this->encodeCDATA($event->getRenderedMessage()); 
-		$buf .= "</$ns:message>".PHP_EOL;
-
-		$ndc = $event->getNDC();
-		if(!empty($ndc)) {
-			$buf .= "<$ns:NDC><![CDATA[";
-			$buf .= $this->encodeCDATA($ndc);
-			$buf .= "]]></$ns:NDC>".PHP_EOL;
-		}
-		
-		$mdcMap = $event->getMDCMap();
-		if (!empty($mdcMap)) {
-			$buf .= "<$ns:properties>".PHP_EOL;
-			foreach ($mdcMap as $name=>$value) {
-				$buf .= "<$ns:data name=\"$name\" value=\"$value\" />".PHP_EOL;
-			}
-			$buf .= "</$ns:properties>".PHP_EOL;
-		}
-
-		if ($this->getLocationInfo()) {
-			$locationInfo = $event->getLocationInformation();
-			$buf .= "<$ns:locationInfo ". 
-					"class=\"" . $locationInfo->getClassName() . "\" ".
-					"file=\"" .  htmlentities($locationInfo->getFileName(), ENT_QUOTES) . "\" ".
-					"line=\"" .  $locationInfo->getLineNumber() . "\" ".
-					"method=\"" . $locationInfo->getMethodName() . "\" ";
-			$buf .= "/>".PHP_EOL;
-		}
-
-		$buf .= "</$ns:event>".PHP_EOL;
-		
-		return $buf;
-	}
-	
-	/**
-	 * @return string
-	 */
-	public function getFooter() {
-		return "</{$this->namespacePrefix}:eventSet>" . PHP_EOL;
-	}
-	
-	
-	/** 
-	 * Whether or not file name and line number will be included in the output.
-	 * @return boolean
-	 */
-	public function getLocationInfo() {
-		return $this->locationInfo;
-	}
-  
-	/**
-	 * The {@link $locationInfo} option takes a boolean value. By default,
-	 * it is set to false which means there will be no location
-	 * information output by this layout. If the the option is set to
-	 * true, then the file name and line number of the statement at the
-	 * origin of the log statement will be output.
-	 */
-	public function setLocationInfo($flag) {
-		$this->setBoolean('locationInfo', $flag);
-	}
-  
-	/**
-	 * @return boolean
-	 */
-	 public function getLog4jNamespace() {
-	 	return $this->log4jNamespace;
-	 }
-
-	/**
-	 * @param boolean
-	 */
-	public function setLog4jNamespace($flag) {
-		$this->setBoolean('log4jNamespace', $flag);
-	}
-	
-	/** 
-	 * Encases a string in CDATA tags, and escapes any existing CDATA end 
-	 * tags already present in the string.
-	 * @param string $string 
-	 */
-	private function encodeCDATA($string) {
-		$string = str_replace(self::CDATA_END, self::CDATA_EMBEDDED_END, $string);
-		return self::CDATA_START . $string . self::CDATA_END;
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverter.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverter.php b/src/main/php/pattern/LoggerPatternConverter.php
deleted file mode 100644
index 3e3ee3c..0000000
--- a/src/main/php/pattern/LoggerPatternConverter.php
+++ /dev/null
@@ -1,131 +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
- */
-
-/**
- * LoggerPatternConverter is an abstract class that provides the formatting 
- * functionality that derived classes need.
- * 
- * <p>Conversion specifiers in a conversion patterns are parsed to
- * individual PatternConverters. Each of which is responsible for
- * converting a logging event in a converter specific manner.</p>
- * 
- * @version $Revision$
- * @package log4php
- * @subpackage helpers
- * @since 0.3
- */
-abstract class LoggerPatternConverter {
-	
-	/**
-	 * Next converter in the converter chain.
-	 * @var LoggerPatternConverter 
-	 */
-	public $next = null;
-	
-	/**
-	 * Formatting information, parsed from pattern modifiers. 
-	 * @var LoggerFormattingInfo
-	 */
-	protected $formattingInfo;
-	
-	/**
-	 * Converter-specific formatting options.
-	 * @var array
-	 */
-	protected $option;
-
-	/**
-	 * Constructor 
-	 * @param LoggerFormattingInfo $formattingInfo
-	 * @param array $option
-	 */
-	public function __construct(LoggerFormattingInfo $formattingInfo = null, $option = null) {  
-		$this->formattingInfo = $formattingInfo;
-		$this->option = $option;
-		$this->activateOptions();
-	}
-	
-	/**
-	 * Called in constructor. Converters which need to process the options 
-	 * can override this method. 
-	 */
-	public function activateOptions() { }
-  
-	/**
-	 * Converts the logging event to the desired format. Derived pattern 
-	 * converters must implement this method.
-	 *
-	 * @param LoggerLoggingEvent $event
-	 */
-	abstract public function convert(LoggerLoggingEvent $event);
-
-	/**
-	 * Converts the event and formats it according to setting in the 
-	 * Formatting information object.
-	 *
-	 * @param string &$sbuf string buffer to write to
-	 * @param LoggerLoggingEvent $event Event to be formatted.
-	 */
-	public function format(&$sbuf, $event) {
-		$string = $this->convert($event);
-		
-		if (!isset($this->formattingInfo)) {
-			$sbuf .= $string;
-			return;	
-		}
-		
-		$fi = $this->formattingInfo;
-		
-		// Empty string
-		if($string === '' || is_null($string)) {
-			if($fi->min > 0) {
-				$sbuf .= str_repeat(' ', $fi->min);
-			}
-			return;
-		}
-		
-		$len = strlen($string);
-	
-		// Trim the string if needed
-		if($len > $fi->max) {
-			if ($fi->trimLeft) {
-				$sbuf .= substr($string, $len - $fi->max, $fi->max);
-			} else {
-				$sbuf .= substr($string , 0, $fi->max);
-			}
-		}
-		
-		// Add padding if needed
-		else if($len < $fi->min) {
-			if($fi->padLeft) {
-				$sbuf .= str_repeat(' ', $fi->min - $len);
-				$sbuf .= $string;
-			} else {
-				$sbuf .= $string;
-				$sbuf .= str_repeat(' ', $fi->min - $len);
-			}
-		}
-		
-		// No action needed
-		else {
-			$sbuf .= $string;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverterClass.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverterClass.php b/src/main/php/pattern/LoggerPatternConverterClass.php
deleted file mode 100644
index c2e2991..0000000
--- a/src/main/php/pattern/LoggerPatternConverterClass.php
+++ /dev/null
@@ -1,64 +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
- */
-
-/**
- * Returns the fully qualified class name of the class from which the logging 
- * request was issued.
- * 
- * @package log4php
- * @subpackage pattern
- * @version $Revision$
- * @since 2.3
- */
-class LoggerPatternConverterClass extends LoggerPatternConverter {
-
-	/** Length to which to shorten the class name. */
-	private $length;
-	
-	/** Holds processed class names. */
-	private $cache = array();
-	
-	public function activateOptions() {
-		// Parse the option (desired output length)
-		if (isset($this->option) && is_numeric($this->option) && $this->option >= 0) {
-			$this->length = (integer) $this->option;
-		}
-	}
-
-	public function convert(LoggerLoggingEvent $event) {
-		$name = $event->getLocationInformation()->getClassName();
-	
-		if (!isset($this->cache[$name])) {
-	
-			// If length is set return shortened class name
-			if (isset($this->length)) {
-				$this->cache[$name] = LoggerUtils::shortenClassName($name, $this->length);
-			}
-				
-			// If no length is specified return the full class name
-			else {
-				$this->cache[$name] = $name;
-			}
-		}
-	
-		return $this->cache[$name];
-	}
-}
- 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverterCookie.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverterCookie.php b/src/main/php/pattern/LoggerPatternConverterCookie.php
deleted file mode 100644
index 1b836aa..0000000
--- a/src/main/php/pattern/LoggerPatternConverterCookie.php
+++ /dev/null
@@ -1,35 +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
- */
-
-/**
- * Returns a value from the $_COOKIE superglobal array corresponding to the 
- * given key. If no key is given, return all values.
- * 
- * Options:
- *  [0] $_COOKIE key value
- * 
- * @package log4php
- * @subpackage pattern
- * @version $Revision$
- * @since 2.3
- */
-class LoggerPatternConverterCookie extends LoggerPatternConverterSuperglobal {
-	protected $name = '_COOKIE';
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverterDate.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverterDate.php b/src/main/php/pattern/LoggerPatternConverterDate.php
deleted file mode 100644
index 2894491..0000000
--- a/src/main/php/pattern/LoggerPatternConverterDate.php
+++ /dev/null
@@ -1,91 +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
- */
-
-/**
- * Returns the date/time of the logging request.
- * 
- * Option: the datetime format, as used by the date() function. If 
- * the option is not given, the default format 'c' will be used.
- * 
- * There are several "special" values which can be given for this option:
- * 'ISO8601', 'ABSOLUTE' and 'DATE'.
- * 
- * @package log4php
- * @subpackage pattern
- * @version $Revision$
- * @since 2.3
- */
-class LoggerPatternConverterDate extends LoggerPatternConverter {
-
-	const DATE_FORMAT_ISO8601 = 'c';
-	
-	const DATE_FORMAT_ABSOLUTE = 'H:i:s';
-	
-	const DATE_FORMAT_DATE = 'd M Y H:i:s.u';
-	
-	private $format = self::DATE_FORMAT_ISO8601;
-	
-	private $specials = array(
-		'ISO8601' => self::DATE_FORMAT_ISO8601,
-		'ABSOLUTE' => self::DATE_FORMAT_ABSOLUTE,
-		'DATE' => self::DATE_FORMAT_DATE,
-	);
-	
-	private $useLocalDate = false;
-	
-	public function activateOptions() {
-		
-		// Parse the option (date format)
-		if (!empty($this->option)) {
-			if(isset($this->specials[$this->option])) {
-				$this->format = $this->specials[$this->option];
-			} else {
-				$this->format = $this->option;
-			}
-		}
-		
-		// Check whether the pattern contains milliseconds (u)
-		if (preg_match('/(?<!\\\\)u/', $this->format)) {
-			$this->useLocalDate = true;
-		}
-	}
-	
-	public function convert(LoggerLoggingEvent $event) {
-		if ($this->useLocalDate) {
-			return $this->date($this->format, $event->getTimeStamp());
-		}
-		return date($this->format, $event->getTimeStamp());
-	}
-	
-	/**
-	 * Currently, PHP date() function always returns zeros for milliseconds (u)
-	 * on Windows. This is a replacement function for date() which correctly 
-	 * displays milliseconds on all platforms. 
-	 * 
-	 * It is slower than PHP date() so it should only be used if necessary. 
-	 */
-	private function date($format, $utimestamp) {
-		$timestamp = floor($utimestamp);
-		$ms = floor(($utimestamp - $timestamp) * 1000);
-		$ms = str_pad($ms, 3, '0', STR_PAD_LEFT);
-	
-		return date(preg_replace('`(?<!\\\\)u`', $ms, $format), $timestamp);
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverterEnvironment.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverterEnvironment.php b/src/main/php/pattern/LoggerPatternConverterEnvironment.php
deleted file mode 100644
index 07e83e1..0000000
--- a/src/main/php/pattern/LoggerPatternConverterEnvironment.php
+++ /dev/null
@@ -1,35 +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
- */
-
-/**
- * Returns a value from the $_ENV superglobal array corresponding to the 
- * given key.
- * 
- * Options:
- *  [0] $_ENV key value
- * 
- * @package log4php
- * @subpackage pattern
- * @version $Revision$
- * @since 2.3
- */
-class LoggerPatternConverterEnvironment extends LoggerPatternConverterSuperglobal {
-	protected $name = '_ENV';
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverterFile.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverterFile.php b/src/main/php/pattern/LoggerPatternConverterFile.php
deleted file mode 100644
index 7898db6..0000000
--- a/src/main/php/pattern/LoggerPatternConverterFile.php
+++ /dev/null
@@ -1,34 +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
- */
-
-/**
- * Returns the name of the file from which the logging request was issued. 
- * 
- * @package log4php
- * @subpackage pattern
- * @version $Revision$
- * @since 2.3
- */
-class LoggerPatternConverterFile extends LoggerPatternConverter {
-
-	public function convert(LoggerLoggingEvent $event) {
-		return $event->getLocationInformation()->getFileName();
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverterLevel.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverterLevel.php b/src/main/php/pattern/LoggerPatternConverterLevel.php
deleted file mode 100644
index e1e08c6..0000000
--- a/src/main/php/pattern/LoggerPatternConverterLevel.php
+++ /dev/null
@@ -1,34 +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
- */
-
-/**
- * Returns the event's level.
- * 
- * @package log4php
- * @subpackage pattern
- * @version $Revision$
- * @since 2.3
- */
-class LoggerPatternConverterLevel extends LoggerPatternConverter {
-
-	public function convert(LoggerLoggingEvent $event) {
-		return $event->getLevel()->toString();
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverterLine.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverterLine.php b/src/main/php/pattern/LoggerPatternConverterLine.php
deleted file mode 100644
index 4fd6f22..0000000
--- a/src/main/php/pattern/LoggerPatternConverterLine.php
+++ /dev/null
@@ -1,35 +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
- */
-
-/**
- * Returns the line number within the file from which the logging request was 
- * issued. 
- * 
- * @package log4php
- * @subpackage pattern
- * @version $Revision$
- * @since 2.3
- */
-class LoggerPatternConverterLine extends LoggerPatternConverter {
-
-	public function convert(LoggerLoggingEvent $event) {
-		return $event->getLocationInformation()->getLineNumber();
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverterLiteral.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverterLiteral.php b/src/main/php/pattern/LoggerPatternConverterLiteral.php
deleted file mode 100644
index 658b1dc..0000000
--- a/src/main/php/pattern/LoggerPatternConverterLiteral.php
+++ /dev/null
@@ -1,40 +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
- */
-
-/**
- * Returns the literal value passed in the constructor, without modifications.
- * 
- * @package log4php
- * @subpackage pattern
- * @version $Revision$
- * @since 2.3
- */
-class LoggerPatternConverterLiteral extends LoggerPatternConverter {
-
-	private $literalValue;
-	
-	public function __construct($literalValue) {
-		$this->literalValue = $literalValue;
-	}
-	
-	public function convert(LoggerLoggingEvent $event) {
-		return $this->literalValue;
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverterLocation.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverterLocation.php b/src/main/php/pattern/LoggerPatternConverterLocation.php
deleted file mode 100644
index c6af014..0000000
--- a/src/main/php/pattern/LoggerPatternConverterLocation.php
+++ /dev/null
@@ -1,39 +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
- */
-
-/**
- * Returns the line number within the file from which the logging request was 
- * issued. 
- * 
- * @package log4php
- * @subpackage pattern
- * @version $Revision$
- * @since 2.3
- */
-class LoggerPatternConverterLocation extends LoggerPatternConverter {
-
-	public function convert(LoggerLoggingEvent $event) {
-		return 
-			$event->getLocationInformation()->getClassName() . '.' .
-			$event->getLocationInformation()->getMethodName() . '(' .
-			$event->getLocationInformation()->getFileName() . ':' .
-			$event->getLocationInformation()->getLineNumber() . ')';
-	}
-}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/79ed2d0d/src/main/php/pattern/LoggerPatternConverterLogger.php
----------------------------------------------------------------------
diff --git a/src/main/php/pattern/LoggerPatternConverterLogger.php b/src/main/php/pattern/LoggerPatternConverterLogger.php
deleted file mode 100644
index cf1007c..0000000
--- a/src/main/php/pattern/LoggerPatternConverterLogger.php
+++ /dev/null
@@ -1,65 +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
- */
-
-/**
- * Returns the name of the logger which created the logging request.
- * 
- * Takes one option, which is an integer. If the option is given, the logger 
- * name will be shortened to the given length, if possible.
- * 
- * @package log4php
- * @subpackage pattern
- * @version $Revision$
- * @since 2.3
- */
-class LoggerPatternConverterLogger extends LoggerPatternConverter {
-
-	/** Length to which to shorten the name. */
-	private $length;
-	
-	/** Holds processed logger names. */
-	private $cache = array();
-	
-	public function activateOptions() {
-		// Parse the option (desired output length)
-		if (isset($this->option) && is_numeric($this->option) && $this->option >= 0) {
-			$this->length = (integer) $this->option;
-		}
-	}
-	
-	public function convert(LoggerLoggingEvent $event) {
-		$name = $event->getLoggerName();
-		
-		if (!isset($this->cache[$name])) {
-
-			// If length is set return shortened logger name 
-			if (isset($this->length)) {
-				$this->cache[$name] = LoggerUtils::shortenClassName($name, $this->length);
-			} 
-			
-			// If no length is specified return full logger name
-			else {
-				$this->cache[$name] = $name;
-			}
-		} 
-		
-		return $this->cache[$name];
-	}
-}


Mime
View raw message