commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r377189 - /jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
Date Sun, 12 Feb 2006 15:07:33 GMT
Author: rdonkin
Date: Sun Feb 12 07:07:32 2006
New Revision: 377189

URL: http://svn.apache.org/viewcvs?rev=377189&view=rev
Log:
Sun classloaders typically have very bad toString methods. Others (for example, IDM classloaders)
output useful information. Added toString call which may be very useful in the latter case.

Modified:
    jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java

Modified: jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java?rev=377189&r1=377188&r2=377189&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
(original)
+++ jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
Sun Feb 12 07:07:32 2006
@@ -1377,15 +1377,18 @@
         logDiagnostic(
             "[ENV] Class " + className + " was loaded via classloader "
             + objectId(classLoader));
-            
+        if (classLoader != null) {
+            final String classLoaderString = classLoader.toString();
+            logDiagnostic("[ENV] " + objectId(classLoader) + " == '" + classLoaderString
+ "'");
+        }
+        
         try {
             systemClassLoader = ClassLoader.getSystemClassLoader();
         } catch(SecurityException ex) {
             logDiagnostic(
                 "[ENV] Security forbids determining the system classloader.");
             return;
-        }
-
+        }        
         if (classLoader != null) {
             StringBuffer buf = new StringBuffer("[ENV] ClassLoader tree:");
             for(;;) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message