logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject svn commit: r1178307 - in /logging/log4php/branches/experimental/config-adapters/src/main/php: ./ appenders/ helpers/ layouts/
Date Mon, 03 Oct 2011 06:43:51 GMT
Author: ihabunek
Date: Mon Oct  3 06:43:50 2011
New Revision: 1178307

URL: http://svn.apache.org/viewvc?rev=1178307&view=rev
Log:
Some tweaks.

Removed:
    logging/log4php/branches/experimental/config-adapters/src/main/php/appenders/LoggerAppenderAdodb.php
Modified:
    logging/log4php/branches/experimental/config-adapters/src/main/php/LoggerConfigurator.php
    logging/log4php/branches/experimental/config-adapters/src/main/php/LoggerReflectionUtils.php
    logging/log4php/branches/experimental/config-adapters/src/main/php/helpers/LoggerClassNamePatternConverter.php
    logging/log4php/branches/experimental/config-adapters/src/main/php/helpers/LoggerNamedPatternConverter.php
    logging/log4php/branches/experimental/config-adapters/src/main/php/layouts/LoggerLayoutPattern.php

Modified: logging/log4php/branches/experimental/config-adapters/src/main/php/LoggerConfigurator.php
URL: http://svn.apache.org/viewvc/logging/log4php/branches/experimental/config-adapters/src/main/php/LoggerConfigurator.php?rev=1178307&r1=1178306&r2=1178307&view=diff
==============================================================================
--- logging/log4php/branches/experimental/config-adapters/src/main/php/LoggerConfigurator.php
(original)
+++ logging/log4php/branches/experimental/config-adapters/src/main/php/LoggerConfigurator.php
Mon Oct  3 06:43:50 2011
@@ -55,7 +55,7 @@ class LoggerConfigurator
             'default' => array(
                 'class' => 'LoggerAppenderEcho',
                 'layout' => array(
-                    'class' => 'LoggerLayoutSimple',
+                    'class' => 'LoggerLayoutTTCC',
                 ),
             ),
         ),
@@ -231,6 +231,14 @@ class LoggerConfigurator
 	 * @param array $config Appender configuration options.
 	 */
 	private function configureAppender($name, $config) {
+
+		// TODO: add this check to other places it might be useful
+		if (!is_array($config)) {
+			$type = gettype($config);
+			$this->warn("Invalid configuration provided for [$name] appender. Expected an array,
found <$type>. Skipping appender definition.");
+			return;
+		}
+		
 		// Parse appender class
 		$class = $config['class'];
 		if (!class_exists($class)) {

Modified: logging/log4php/branches/experimental/config-adapters/src/main/php/LoggerReflectionUtils.php
URL: http://svn.apache.org/viewvc/logging/log4php/branches/experimental/config-adapters/src/main/php/LoggerReflectionUtils.php?rev=1178307&r1=1178306&r2=1178307&view=diff
==============================================================================
--- logging/log4php/branches/experimental/config-adapters/src/main/php/LoggerReflectionUtils.php
(original)
+++ logging/log4php/branches/experimental/config-adapters/src/main/php/LoggerReflectionUtils.php
Mon Oct  3 06:43:50 2011
@@ -129,7 +129,6 @@ class LoggerReflectionUtils {
 	 */
 	public static function createObject($class) {
 		if(!empty($class)) {
-			$class = basename($class);
 			return new $class();
 		}
 		return null;

Modified: logging/log4php/branches/experimental/config-adapters/src/main/php/helpers/LoggerClassNamePatternConverter.php
URL: http://svn.apache.org/viewvc/logging/log4php/branches/experimental/config-adapters/src/main/php/helpers/LoggerClassNamePatternConverter.php?rev=1178307&r1=1178306&r2=1178307&view=diff
==============================================================================
--- logging/log4php/branches/experimental/config-adapters/src/main/php/helpers/LoggerClassNamePatternConverter.php
(original)
+++ logging/log4php/branches/experimental/config-adapters/src/main/php/helpers/LoggerClassNamePatternConverter.php
Mon Oct  3 06:43:50 2011
@@ -40,6 +40,8 @@ class LoggerClassNamePatternConverter ex
 	 */
 	public function getFullyQualifiedName($event) {
 		return $event->getFullQualifiedClassname();
+		// TODO: this maybe?
+		// return $event->getLocationInformation()->getClassName();
 	}
 }
 

Modified: logging/log4php/branches/experimental/config-adapters/src/main/php/helpers/LoggerNamedPatternConverter.php
URL: http://svn.apache.org/viewvc/logging/log4php/branches/experimental/config-adapters/src/main/php/helpers/LoggerNamedPatternConverter.php?rev=1178307&r1=1178306&r2=1178307&view=diff
==============================================================================
--- logging/log4php/branches/experimental/config-adapters/src/main/php/helpers/LoggerNamedPatternConverter.php
(original)
+++ logging/log4php/branches/experimental/config-adapters/src/main/php/helpers/LoggerNamedPatternConverter.php
Mon Oct  3 06:43:50 2011
@@ -60,6 +60,9 @@ class LoggerNamedPatternConverter extend
 		if($this->precision <= 0) {
 			return $n;
 		} else {
+			
+			// TODO: do this with explode()
+			
 			$len = strlen($n);
 			// We substract 1 from 'len' when assigning to 'end' to avoid out of
 			// bounds exception in return r.substring(end+1, len). This can happen if

Modified: logging/log4php/branches/experimental/config-adapters/src/main/php/layouts/LoggerLayoutPattern.php
URL: http://svn.apache.org/viewvc/logging/log4php/branches/experimental/config-adapters/src/main/php/layouts/LoggerLayoutPattern.php?rev=1178307&r1=1178306&r2=1178307&view=diff
==============================================================================
--- logging/log4php/branches/experimental/config-adapters/src/main/php/layouts/LoggerLayoutPattern.php
(original)
+++ logging/log4php/branches/experimental/config-adapters/src/main/php/layouts/LoggerLayoutPattern.php
Mon Oct  3 06:43:50 2011
@@ -140,7 +140,7 @@ class LoggerLayoutPattern extends Logger
 	const DEFAULT_CONVERSION_PATTERN = '%m%n';
 
 	/** Default conversion TTCC Pattern */
-	const TTCC_CONVERSION_PATTERN = '%r [%t] %p %c %x - %m%n';
+	const TTCC_CONVERSION_PATTERN = '%d [%t] %p %c %x - %m%n';
 
 	/** The pattern. 
 	 * @var string */



Mime
View raw message