I have done the following:

Using Log4J

create a singleton ServletAppender that pipes output to Log4J

all my servlets check to see if this is initialized and if not they init it with the 
ServletContext.

Servlet logging works normally.

Log4J logging methods (called from my non-servlet classes) append to the servlet log.

HTH

> Date: Thu, 5 Apr 2001 05:01:40 -0500
> To: [EMAIL PROTECTED]
> From: Ed Gomolka <[EMAIL PROTECTED]>
> Subject: Re: Tomcat equivalent of JServ's LogWriter?
> Message-Id: <01040505014000.07284@gomolka>
> 
> On Wednesday 04 April 2001 20:23, Chris Bailey wrote:
> > Is there an equivalent to Apache JServ's LogWriter
> > (org.apache.java.io.LogWriter) facility in Tomcat?
> I'm not familiar with LogWriter.
> Tomcat supports logging as described in the servlet API.
> (In other words, the ServletContext log methods.)
> If you need a more comprehensive approach to logging, 
> check out the log4j project on the Apache Jakarta site. 
> A lot of people are using it with Tomcat.
> I haven't tried it yet personally... it's on my todo list.

Reply via email to