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:[EMAIL PROTECTED] 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to