You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Aditya <ad...@grot.org> on 2003/01/17 22:47:31 UTC

Tomcat "id" in AccessLogValve and Spread

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.

However, now that I am collecting access logs from multiple Tomcats in a
single location, I need to be able to tell which Tomcat a log line came from.
Since the AccessLogValve comes from inside a <Host/> stanza, I can use %v to
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?

Thanks,
Adi

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


Re: Tomcat "id" in AccessLogValve and Spread

Posted by Tim Funk <fu...@joedog.org>.
You can declare your own custom pattern in AccessLogValve in server.xml. 
Then you can always hardcode your "id" into the pattern.

-Tim

Aditya wrote:
> 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.
> 
> However, now that I am collecting access logs from multiple Tomcats in a
> single location, I need to be able to tell which Tomcat a log line came from.
> Since the AccessLogValve comes from inside a <Host/> stanza, I can use %v to
> 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?
> 
> Thanks,
> Adi
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 


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