---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool application server
---------------------------------------------------------------------------
----- Original Message ----- From: "Filip Hanik - Dev Lists" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Friday, October 12, 2007 9:44 PM
Subject: Re: embedded Tomcat (5.5.23) application logging (java.util.logging)


this is an example

   private static org.apache.juli.logging.Log log=
org.apache.juli.logging.LogFactory.getLog( IntrospectionUtils.class );


as soon as that statement is executed, the logging gets initialized.
as you can see, it is a static field, so when you run Tomcat embedded, before any classes are loaded (that would lead to initialization), you must set those properties.

as you can see, the Embedded class also does this

public class Embedded  extends StandardService implements Lifecycle {
   private static Log log = LogFactory.getLog(Embedded.class);

meaning, if you have references to embedded in your "public static void main(String[] args)" class, then it's too late to set the system properties at that time

Filip

Hi Filip... maybe you can help me here...
Its actually not that I'm starting TC then doing the System.setProperty.... I do props first. I'm using the 6.0.13 code and when I search it for "java.util.logging.manager" ... ie to see where it actualy reads this property, I can find it anywhere.

For example in ClassLoaderLogManager... there is the this line for getting the prop to the config file...
String configFileStr = System.getProperty("java.util.logging.config.file");

BUT there seems to be no similar line to read this property...
System.setProperty("java.util.logging.manager", "org.apache.juli.ClassLoaderLogManager");

So the problem seems to be that nowhere does the TC code read this property?????? Its like I got a missing class... or theres a precompiled class that must be included.... I dont understand this???

Thanks...





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to