tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Lyle" <>
Subject Java Logging API and stderr.log
Date Tue, 29 Apr 2003 10:24:23 GMT
Hi All,

I have a webservices application running as an NT service on Tomcat 4.1,
Windows 2000 server and i've been using the Java Logging API to redirect all
the log messages to my own log files which i've initialised in the following

private static void initialiseLogs(){
//initialise dao log
//initailise other logs....

private static Handler getHandler(String name) throws IOException{
Handler handler = new FileHandler(LOG_FOLDER + File.separator + name
handler.setFormatter(new SimpleFormatter());
//set the handlers log level
return handler;

Now this works fine, in that i only get SEVERE messages written to my dao
log file, and if i set the level to INFO i get everything written to the
file. The problem is that no matter what i set the level to ALL my log
messages get written to the Tomcat stderr.log as well(which resides at:
C:\Program Files\Apache Group\Tomcat 4.1\logs\stderr.log)

Since, like a good little programmer, i had statements all over
my code during development this means that the stderr.log gets very big very
quickly. How do i stop tomcat writing everything to stderr? And why is it
doing it in the first place? I have no System.err.println() anywhere in the
code(except to catch the log initialisation exception). I'm guessing that
its something to do with the configuration of the Java Logging API but i'm
at a loss as to what as this is the first time i've used it.

Any help much appreciated


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message