tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Laurent ...@opikanoba.org>
Subject Re: Newbie Question about logging
Date Tue, 11 Jun 2002 12:31:14 GMT
ben@popworld.com wrote:
> Hi All,
> 
> I have just started using 1.4 and using the application log files.
> 
> These are great for build errors etc but how can I get my servlets to write
> runtime errors to that log (ie ORA errors).
> 

see the servlet specifications
in 2.2, the ServletContext interface have log methods
in javadoc
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletContext.html
see the log methods
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletContext.html#log(java.lang.String)
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletContext.html#log(java.lang.String,%20java.lang.Throwable)

just add in your doGet method
log("my log");

that's enough !

> At the moment my catches just write to System.out.println as I hoped the
> logs would receive standard err?

-- 
Frédéric Laurent
http://www.opikanoba.org



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


Mime
View raw message