-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Martin,
Martin Strand wrote: > Hi all. :) > I want to make Tomcat send it's access log to a remote server (log4j or > syslog). > Configuring all other logging with log4j is pretty simple but it seems I > can't do the same with the AccessLogValve. Do I need to write my own > Valve in order to do that? Perhaps someone else has already done this? Log4j already has built-in support for syslog. You can just use the syslog appender configured appropriately and your logs should stream to another server. I'm not sure how the AccessLogValve works, exactly, and how it does its logging. If it just uses commons-logging that can be captured by log4j and routed to a particular appender, then you should be able to do something like: log4j.category.org.apache.tomcat.catalina.AccessLogValve=syslog, INFO log4j.appender.syslog=org.apache.log4j.net.SyslogAppender log4j.appender.syslog.layout=[whatever] log4j.appender.syslog.syslogHost=some.remote.host log4j.appender.syslog.facilityString=my-webapp Hope that helps, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGCnzM9CaO5/Lv0PARAsp4AJ4xkicVii0CP2BWBrA6DXmm3TlIjQCfeCVJ qPdrKHMH+B4ITc7/GJVdpbg= =7ZWU -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
