On Mon, 27 Sep 2004 20:11:24 +0100, Paul Taylor <[EMAIL PROTECTED]> 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 ?

I doubt that this kind of logging configuration can be done in the
webapp, due to classloader visibility.

-- 
xxxxxxxxxxxxxxxxxxxxxxxxx
R�my Maucherat
Developer & Consultant
JBoss Group (Europe) S�RL
xxxxxxxxxxxxxxxxxxxxxxxxx

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

Reply via email to