You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by be...@popworld.com on 2002/06/11 13:14:48 UTC
Newbie Question about logging
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).
At the moment my catches just write to System.out.println as I hoped the
logs would receive standard err?
Any help is very much appreciated.
Ben Wrigley
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Newbie Question about logging
Posted by Frédéric Laurent <fl...@opikanoba.org>.
Frédéric Laurent wrote:
>
> see the servlet specifications
> in 2.2, the ServletContext interface have log methods
sorry I would say GenericServlet instead of ServletContext
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/GenericServlet.html#log(java.lang.String)
> just add in your doGet method
> log("my log");
>
> that's enough !
>
--
Frédéric Laurent
http://www.opikanoba.org
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Newbie Question about logging
Posted by Frédéric Laurent <fl...@opikanoba.org>.
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>