tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Yunusov <pyunu...@rogers.com>
Subject Re: How do I...
Date Fri, 10 Jan 2003 18:34:48 GMT
On Friday 10 January 2003 01:18 pm, Dan Lipofsky wrote:
> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
> >
> > tells about using the Context element in server.xml to configure a
> > webapp. Scroll down and note the Logger entry under Nested Components. I
> > hope this helps.
>
> I have the same question as Luc.
> I set up a Context with a Logger inside.
> Messages such as JSP compile errors go to the
> Logger I set up, but messages that are printed
> to System.out still show up in catalina.out.
> I read the docs above but I don't see how to change this.
> Thanks,
> Dan

You can't do that individually for contexts, AFAIK. Use ServletContext.log() 
instead of System.out.println() to manage log output with Context-specific 
Loggers.

You can change the destination of all System.out's for your entire Catalina 
engine if you edit catalina.sh.

System.out is whatever standard output Catalina is pointed at, and, 
respectively, System.err is whatever standard error output Catalina is 
pointed at. Standard output and standard error output are OS concepts and 
they can be set to a file, console, etc. when running the actual server 
startup command.

That command is a part of the catalina.sh script (and its Windows equivalent). 
Search that script for /logs/catalina.out and you will see the output 
streams' redirection in action.

The above is based on the assumption that you use Tomcat 4.1.x.

Paul

--
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