I've written a new class that extends o.a.c.logger.LoggerBase (using
spread - www.spread.org) and can be used as a <Logger> in server.xml;
AFAICT it works fine and does what I wanted it to do. However it seems
that there can only be one <Logger> section per container which means
I can't have (for testing purposes at least) something like this:
<Host ...>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="/var/log/tomcat" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
<Logger className="com.zapatec.catalina.SpreadLogger"
spreadName="localhost-six"
spreadGroup="tcexcep"
timestamp="true"/>
</Host>
which writes both the logfile to disk and sends a copy of the log
messages via spread without having to have both in the same class. Is
there a reason why one can't have multiple Logger sesions per
container?
Thanks,
Adi
> On Fri, 17 Jan 2003 16:54:07 -0500, "Shapira, Yoav" <[EMAIL PROTECTED]> said:
> Howdy,
>> I'm trying to consolidate the access logs for a whole bunch of
>> Tomcats using Spread (www.spread.org) like I do with Apache. The
>> easiest way to
> do >this seems to be to "patch"
> org.apache.catalina.valves.AccessLogValve to >use Spread and I've
> done that trivially.
> Perhaps it would be better to subclass AccessLogValve to add this
> functionality? Then you could contribute your class to the tomcat
> project and users of the normal AccessLogValve wouldn't need to know
> anything (or depend on) Spread.
>> somewhat figure out where it came from, but I run into problems
>> when I
> have
>> multiple Tomcats load-balanced by mod_jk serving the same virtual
> hosts.
>> The easiest way then to tell where it came from seems to be to use
>> the jvmRouteId any other, better, more easily obtained, unique
>> identifier I
> can >use?
> The combination of host name and jvmRouteId is decent.
> Would %A (local IP address) in the access log work for you? I'm
> assuming your load-balanced servers have different IP addresses even
> if they share the virtual hosts.
> Yoav Shapira Millennium ChemInformatics
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]