Thanks for the pointers!  I think the request dumper valve would work, but
it will probably provide too much information for me.  I only want the logs
to only show exceptions and errors or the information that developers
intentionally write to System.out.

I do need to know which host is causing the exception, but it doesn't matter
much for the developer comments to system.out.



-----Original Message-----
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 12, 2002 8:01 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: How can I get better logs from tomcat4.1.x?


Howdy,
Are you looking to monitor tomcat internally, in which case things like
the RequestDumperValve configured at the top level (so all hosts share
it) might be useful?  Or a debug="99" (instead of the default debug="0")
setting on each host, along with that host's logger configured to write
to the same file as all the others?

Or are you looking to monitor your own apps, in which case I'd suggest
the container-independent solution of a separate logging component, e.g.
log4j?  Using log4j you could easily log from all your hosts and threads
into one file.

I don't think relying on System.out and System.err for your logging is
that good an idea, as different servers swallow the output from those
streams in different ways.  The behavior of those streams can be
OS-dependent as well.


Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Brandon Cruz [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, December 11, 2002 5:17 PM
>To: Tomcat Users List
>Subject: 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:   <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to