To get stuff into the log, you have to do the following (I'm assuming your
in a servlet at the time!)
this.getServletContext().log("msg");
or
this.getServletContext().log("msg", exception);
Check the API docs for HttpServletContext for more details. As to how you
can tailor this logging to reflect the debug level set for your context (ala
log4j), I don't know. This works a treat in all my stuff anyway.
sam
----- Original Message -----
From: "Will England" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 4:59 PM
Subject: Logging, server.xml and so on
> Greetings!
>
> After many days of searching and so on, I am still looking for information
> on using the default logging built into Tomcat.
>
> I am running Tomcat 3.2.1 under apache 1.3.12 on Solaris 2.7, with Java
> 1.3.
>
> I have a servlet application set up that catches all the 'expected' errors
> and logs them to text files, databases, etc. This includes bad input,
> missing or wrong parameters, and so on.
>
> However, I still need to catch 'unexpected' errors at the top level and
> log them to a standard log file. Currently, I just am doing this:
>
<snip>