tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <gl...@mail.more.net>
Subject Re: Apache Tomcat 4.1.24 logging question
Date Sun, 15 Jun 2003 12:08:45 GMT
pmatteo@freemail.it wrote:
> Hello,
> 
>   I'm a brand new user of Apache Tomcat 4.1.24 (on windows 2000), and I have a question.
> 
> First of all, forgive me if this is trivial, but investigating the source, and various
web resources, I was not capable to find the answer, so I hope you can help me.
> 
> I saw that Tomcat has a different log for each deployed web application.
> 
> And I also saw that there is a log (example: localhost_log.2003-06-14.txt) that is the
server log.
> 
> I wrote a class that does some stuff, I jarred it and I've put it in the "endorsed" directory.
> It is important, for me, that this class is loaded from that directory
> (it is not relevant, for the sake of my question, to tell you why; just take it as a
"must").
> 
> Well, how can I do to write to the server log from within that class ?
> More precisely, which "import" and APIs must I use ?
> 

If you configure your Tomcat Host with the attribute swallowOutput="true" you can just
print to System.out.  Tomcat will make sure the output gets into the appropriate Host
or web application log.

Regards,

Glenn


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


Mime
View raw message