----- Original Message -----
From: "Carl Mosca" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Friday, October 12, 2007 4:29 PM
Subject: embedded Tomcat (5.5.23) application logging (java.util.logging)
This was a recent related topic here but I did not understand the issue to
quite the same as what I am seeing.
I've got an Tomcat embedded in an application and the two hosted web
applications are running OK.
Logging is working OK in the host application and from Tomcat itself. I
am
not getting any output from the hosted applications which are using
java.util.logging.
I get output from these applications when they run on Tomcat itself.
I am wondering if someone has an example of or can tell me where embedded
Tomcat is expecting to find logging configuration files for hosted
applications using java.util.logging (or are there some properties I need
to
set up for each war/application).
In theory this should work
System.setProperty("catalina.base", appPath);
System.setProperty("catalina.home", appPath);
System.setProperty("java.util.logging.manager",
"org.apache.juli.ClassLoaderLogManager");
System.setProperty("java.util.logging.config.file",
propLogFile); //Points at logging.properties
Although it never has for me ;)
Why I dont know....
But if I put this on the command line...
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="./build//conf//logging.properties"
-Dcatalina.home="./build" -Dcatalina.base="./build"
it does work....
If you ever figure out why the command line works but the System properties
dont... let me know
I have a feeling System.setProperty doesnt like windows file notation... but
I never got around to proving the theory.
Logging this way also steals the "standard error stream".
In the end I gave up on logging and just redirected the standard error
stream to my application and displayed that in a UI list... that works well,
but is
no good if you using log4j or whatever...
Good luck... cant say I'm too fond of tomcats logging...
TIA,
--
Carl J. Mosca
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]