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.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@691675
13f79535-47bb-0310-9956-
ffa450edef68
}
} 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");