Author: rjung
Date: Wed Sep  3 09:38:17 2008
New Revision: 691675

URL: http://svn.apache.org/viewvc?rev=691675&view=rev
Log:
Enhance http://svn.apache.org/viewvc?rev=646543&view=rev
Don't drop the error silently. Instead use the root logger
already initialized for the system class loader
to write out a warning.
Backport to TC 5.5 will need a couple of casts because
of the lack of generics and the use of HashMaps.

Modified:
    tomcat/trunk/java/org/apache/juli/ClassLoaderLogManager.java

Modified: tomcat/trunk/java/org/apache/juli/ClassLoaderLogManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/ClassLoaderLogManager.java?rev=691675&r1=691674&r2=691675&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/juli/ClassLoaderLogManager.java (original)
+++ tomcat/trunk/java/org/apache/juli/ClassLoaderLogManager.java Wed Sep  3 
09:38:17 2008
@@ -303,7 +303,19 @@
             }
         } catch (AccessControlException ace) {
             // No permission to configure logging in context
-            // Ignore and carry on
+            // Log and carry on
+            ClassLoaderLogInfo info = 
classLoaderLoggers.get(ClassLoader.getSystemClassLoader());
+            if (info != null) {
+                Logger log = info.loggers.get("");
+                if (log != null) {
+                        log.warning("You need to permit read access to your 
context specific java.util.logging logging configuration to " + 
ClassLoaderLogManager.class);
+                        log.warning("See \"per context logging\" in the 
default catalina.policy file.");
+                        log.warning("Original error was: " + ace.getMessage());
+               }
+            }
+         }
+         if ((is == null) && (classLoader == 
ClassLoader.getSystemClassLoader())) {
+             String configFileStr = 
System.getProperty("java.util.logging.config.file");
         }
         if ((is == null) && (classLoader == 
ClassLoader.getSystemClassLoader())) {
             String configFileStr = 
System.getProperty("java.util.logging.config.file");



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to