You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nik Makepeace <ni...@clmp.com> on 2001/02/02 16:00:52 UTC

Logging problems

Does anyone know how to stop tomcat sending all the servlet error 
output to the screen?  The Loggers adequatelt trap and write all the 
tomcat output, but System.err always seems to go to screen.
Any suggestions?

Nik

RE: Logging problems

Posted by Adrian Papari <ad...@cluster46.com>.
well; you could always write your own logging-routine/class... and then in
your code handle exceptions similar to the example-"code" below:

try
{
	/* lot of important code */
}
catch ( ExceptionYouWantToCatch excp )
{
	new LogFile( excp.getMessage(), logFilePath );
}

there's also been a lot of talk on how to do the logging in tomcat... as far
as i know, no one has successfully logged everything they intended to log
(by configuring the supposed files) or perhaps it's just me ;)

Best Regards & Good Luck,
//Adrian Papari.

-----Original Message-----
From: Nik Makepeace [mailto:nikm@clmp.com]
Sent: 02 February 2001 16:56
To: tomcat-user@jakarta.apache.org
Subject: RE: Logging problems


On 2 Feb 2001, at 16:09, Adrian Papari wrote:

> how do you handle the exceptions? if you, for instance, redirect the
> user to an error page when an error occurs, you (or, erm, the user )
> shouldn't see the internal error messages.

They aren't 500 errors, but rather conscious decisions to write to
System.err in the source for the servlets.  Basically, we are using
System.err to write debug for our servlets.

Jserv used to pick up System.err and send it to its error log, but it
seems like Tomcat doesn't behave this way.  Any clues?  We are really
stumped.

Nik

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


RE: Logging problems

Posted by Nik Makepeace <ni...@clmp.com>.
On 2 Feb 2001, at 16:09, Adrian Papari wrote:

> how do you handle the exceptions? if you, for instance, redirect the
> user to an error page when an error occurs, you (or, erm, the user )
> shouldn't see the internal error messages.

They aren't 500 errors, but rather conscious decisions to write to 
System.err in the source for the servlets.  Basically, we are using 
System.err to write debug for our servlets.

Jserv used to pick up System.err and send it to its error log, but it 
seems like Tomcat doesn't behave this way.  Any clues?  We are really 
stumped.

Nik

RE: Logging problems

Posted by Saurabh Shukla <sa...@cysphere.com>.
do tomcat.sh &> out.txt on a linux box. All the error messeges will be
stored in file with name out.txt.

-----Original Message-----
From: Peter Thorsager [mailto:pts@netobjects.com]
Sent: Friday, February 02, 2001 8:36 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: Logging problems


Redirect both the System.out and the System.err to the same outputstream
(which is your FileOutputStream), then you'll avoid the error messages in
the window.

Peter Thorsager


----- Original Message -----
From: "Nik Makepeace" <ni...@clmp.com>
To: <to...@jakarta.apache.org>
Sent: Friday, February 02, 2001 16:00
Subject: Logging problems


> Does anyone know how to stop tomcat sending all the servlet error
> output to the screen?  The Loggers adequatelt trap and write all the
> tomcat output, but System.err always seems to go to screen.
> Any suggestions?
>
> Nik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


Re: Logging problems

Posted by Peter Thorsager <pt...@netobjects.com>.
Redirect both the System.out and the System.err to the same outputstream
(which is your FileOutputStream), then you'll avoid the error messages in
the window.

Peter Thorsager


----- Original Message -----
From: "Nik Makepeace" <ni...@clmp.com>
To: <to...@jakarta.apache.org>
Sent: Friday, February 02, 2001 16:00
Subject: Logging problems


> Does anyone know how to stop tomcat sending all the servlet error
> output to the screen?  The Loggers adequatelt trap and write all the
> tomcat output, but System.err always seems to go to screen.
> Any suggestions?
>
> Nik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org


RE: Logging problems

Posted by Adrian Papari <ad...@cluster46.com>.
how do you handle the exceptions? if you, for instance, redirect the user to
an error page when an error occurs, you (or, erm, the user ) shouldn't see
the internal error messages.

Good luck,
//adrian papari

-----Original Message-----
From: Nik Makepeace [mailto:nikm@clmp.com]
Sent: 02 February 2001 16:01
To: tomcat-user@jakarta.apache.org
Subject: Logging problems


Does anyone know how to stop tomcat sending all the servlet error
output to the screen?  The Loggers adequatelt trap and write all the
tomcat output, but System.err always seems to go to screen.
Any suggestions?

Nik

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org