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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to