logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1602576 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
Date Sat, 14 Jun 2014 09:23:25 GMT
Author: rpopma
Date: Sat Jun 14 09:23:24 2014
New Revision: 1602576

URL: http://svn.apache.org/r1602576
Log:
added debug statements when initializing to facilitate support

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java?rev=1602576&r1=1602575&r2=1602576&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
Sat Jun 14 09:23:24 2014
@@ -156,6 +156,7 @@ public abstract class ConfigurationFacto
             }
         }
 
+        LOGGER.debug("Using configurationFactory {}", configFactory);
         return configFactory;
     }
 
@@ -480,6 +481,7 @@ public abstract class ConfigurationFacto
                             if (type.equals("*") || config != null && config.endsWith(type))
{
                                 final Configuration c = factory.getConfiguration(source);
                                 if (c != null) {
+                                    LOGGER.debug("Loaded configuration from {}", source);
                                     return c;
                                 }
                                 LOGGER.error("Cannot determine the ConfigurationFactory to
use for {}", config);
@@ -549,5 +551,16 @@ public abstract class ConfigurationFacto
         public void setInputStream(final InputStream stream) {
             this.stream = stream;
         }
+        
+        @Override
+        public String toString() {
+            if (file != null) {
+                return file.getAbsolutePath();
+            }
+            if (location != null) {
+                return location;
+            }
+            return "stream (unknown location)";
+        }
     }
 }



Mime
View raw message