Hi,

I have used jdk 1.4 logging with tomcat 5.0.x without any problems, but i have configured logging with java.util.logging.config.file property and
config file.


- Jukka -

Paul Taylor wrote:

Hi in a previous non Tomcat project I wrote some classes that used the java.util.logging library that comes with java 1.4 quite successfully. I am now trying to use the same classes with Toimcat 5.0 but it doesnt like it. With the logging classes you can provide a configuration class which you define with a property "java.util.logging.config.class", I put the class in my WEB_INF\classes with all the other classes.
When I run with Tomcat i have a servlet that does the following to try and initilse the logging


com.appserver.util.logging.LogProperties.setLevelFromParametersFromPrefs();

System.getProperties().setProperty("java.util.logging.config.class", "com.appserver.util.logging.LogProperties");
LogManager.getLogManager().readConfiguration();


it complains it cant find the class, when running readConfiguration(), (The 1st two lines run ok). I think the problem is to do with Tomcat classloader, with a simple Java application the classes would be expected to be on the system classpath, but on Tomcat the system classpath only contains bootstrap.jar.

I realise I could probably get things working using Apaches log4j instead but it seems a bit silly to use that when there is a perfectly adequate logger built into the language now.

Anyone done this ?


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



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



Reply via email to