You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brandon Cruz <bc...@norvax.com> on 2002/12/11 23:16:50 UTC

How can I get better logs from tomcat4.1.x?

We recently upgraded from tomcat 3.2.4.  By default, all logs to System.out
went to logs/tomcat.log.  In 4.1.x, I didn't see that file, so I added these
two loggers to the <Engine>...

<Logger className="org.apache.catalina.logger.SystemOutLogger"/>
<Logger className="org.apache.catalina.logger.SystemErrLogger"/>

That creates logs that don't have much useful info, host and timestamp to be
exact and puts everything to logs/catalina.out.  Example below...

StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Array index out of range: 0

With Tomcat 3.2.4, the logs showed which host generated the error or
message, as well as the timestamp.  This is probably because in 3.2.4, each
host was actually it's own context, but the logging was much nicer.

The reason we need this info is because we want a central location to
monitor errors and be able to track them down to specific virtual hosts and
know when they happened.

Does anyone know if this is possible or would we have to monitor each host
separately now that we have upgraded?

Any information is greatly appreciated!


Brandon Cruz




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How can I get better logs from tomcat4.1.x?

Posted by Reinhard Moosauer <rm...@moosauer.de>.
Hi,

in default server.xml coming with tomcat you will find lines like that:

<Logger className="org.apache.catalina.logger.FileLogger" debug="0"
   directory="logs" prefix="localhost_admin_log." 
   suffix=".txt" timestamp="true" verbosity="1"/>

You can embed these Loggers at different levels to control logging.
The parameters "timestamp" and "debug" may be interesting to you.

The admin-Application also supports editing those.
I recommend you should add a seperate Logger to each Webapp. Especially in 
production envs. And give it a good name with prefix=".." 

kind regards,

Reinhard

Am Mittwoch, 11. Dezember 2002 23:16 schrieb Brandon Cruz:
> We recently upgraded from tomcat 3.2.4.  By default, all logs to System.out
> went to logs/tomcat.log.  In 4.1.x, I didn't see that file, so I added
> these two loggers to the <Engine>...
>
> <Logger className="org.apache.catalina.logger.SystemOutLogger"/>
> <Logger className="org.apache.catalina.logger.SystemErrLogger"/>
>
> That creates logs that don't have much useful info, host and timestamp to
> be exact and puts everything to logs/catalina.out.  Example below...
>
> StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw
> exception org.apache.jasper.JasperException: Array index out of range: 0
>
> With Tomcat 3.2.4, the logs showed which host generated the error or
> message, as well as the timestamp.  This is probably because in 3.2.4, each
> host was actually it's own context, but the logging was much nicer.
>
> The reason we need this info is because we want a central location to
> monitor errors and be able to track them down to specific virtual hosts and
> know when they happened.
>
> Does anyone know if this is possible or would we have to monitor each host
> separately now that we have upgraded?
>
> Any information is greatly appreciated!
>
>
> Brandon Cruz


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>