tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Foisy" <Luc.Fo...@technical-magic.com>
Subject RE: How do I...
Date Fri, 10 Jan 2003 19:24:59 GMT

Thanks paul, that was some kind of answer I was looking for.

Since the documentation said this (after looking at it again just moments ago)
Standard Error Logger (org.apache.catalina.logger.SystemErrLogger)
The Standard Error Logger records all logged messages to whatever stream the standard error
output of Catalina is pointed at. The default Catalina startup script points this at file
logs/catalina.out relative to $CATALINA_HOME. This logger supports no additional attributes.

Standard Output Logger (org.apache.catalina.logger.SystemOutLogger)
The Standard Output Logger records all logged messages to whatever stream the standard output
of Catalina is pointed at. The default Catalina startup script points this at file logs/catalina.out
relative to $CATALINA_HOME. This logger supports no additional attributes.

So I was guessing that context specific stuff couldnt be managed for System.out

At the moment we have a jar file application (non web) so in development mode we have stuff
going through System.out
When we deploy to the web, there are a few extra classes to bridge the application with the
web side of things.

So in my jsp's we can simply call this ServletContext.log(), what would be the best way to
snafu all the System.out and push it through ServletContext.log()??

And here is my nomination for Context specific System.out logging done by tomcat! :)

> | -----Original Message-----
> | From: Paul Yunusov [mailto:pyunusov@rogers.com]
> | Sent: Friday, January 10, 2003 12:35 PM
> | To: Tomcat Users List
> | Subject: Re: How do I...
> | 
> | 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>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 

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