tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Becker, Thomas, VF-Group" <Thomas.Bec...@vodafone.com>
Subject RE: AccessLogValve - tomcat 5.0.x logging to syslog?!
Date Fri, 24 Feb 2006 11:47:00 GMT
Hey Tim,

Thanks a lot. Yes it's a unix system. But I'll probably try then to
write my own AccessLogValve implementation. No clue, if my skills are
sufficient, but I can at least try.

Thanks again,
Thomas 

-----Original Message-----
From: Tim Funk [mailto:funkman@joedog.org] 
Sent: Mittwoch, 22. Februar 2006 12:51
To: Tomcat Users List
Subject: Re: AccessLogValve - tomcat 5.0.x logging to syslog?!

You'd need to implement your own access log valve class to write to
syslog. 
OR if you are using a Unix system you *might* be able to try this
kludge:

1) Create a named pipe (using mkfifo)
2) Configure AccessLogValve to NOT rotate and use that named pipe
3) Run a program which reads from the fifo and writes to syslog, for
example, this tiny perl script:

---
use Sys::Syslog;
open(FIFO, "$myFifoFile") ||die "this won't be pretty, $!";
while(<FIFO>) {
    system('logger', '-t', 'tomcat', '-p', 'local3.info', $_); }
close(FIFO);
---


-Tim

Becker, Thomas, VF-Group wrote:
> Hi everybody,
> 
> I've searched the internet and experimented around getting the 
> following
> done:
> 
> I want to have tomcat logging it's access log to syslog.
> 
> I already successfully have catalina.out and all the server's logs 
> written through log4j, which makes logging to syslog quite easy.
> Only the AccessLogValve is causing me headaches. I don't have any idea

> anymore on how to get it logged through l4j or directly to syslog.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message