syslog to app

Robert Ambrose rna@testpt.com
Thu, 12 Oct 2000 08:47:58 -0700 (MST)


What problems were you having with the FIFO?  It's really going to be the
easiest way.  FIFOs are pretty easy to do stuff with.  The main detail is
you'll want to put a loop around the open/read code to reopen the FIFO
automatically after an EOF.  This is because the reader (your program)  
will get an EOF when the writer (syslogd) closes the FIFO (gets
restarted).  

rna

On Wed, 11 Oct 2000, der.hans wrote:

> moin, moin,
> 
> I need to capture output from syslog into an application. I need that app
> to catch *all* of the output from a particular service.
> 
> I have found that something that watches /var/log/whatever stops working
> when the logs get rotated. Not a good thing. Maybe there's a way to do
> that right. I'd rather not have to tie something into the syslog rotation
> functionality as keeping the activities synced is probably a pain long
> term.
> 
> I see that syslog can handle a FIFO. I tried using that, but it wasn't
> working properly. Haven't ever done anything using FIFOs, so I'm probably
> just hosing that up.
> 
> Anyway, I'd love to have some suggestions on how to do this right.
> 
> I am using perl for my application, but I can do or get a wrapper in c or
> python done if that's better. I'd think perl can do it, though :).
> 
> danke,
> 
> der.hans
> -- 
> #  der.hans@LuftHans.com   home.pages.de/~lufthans/   www.Opnix.com
> #  If you're not learning, you're not living. - der.hans
> 
> 
> _______________________________________________
> Plug-devel mailing list  -  Plug-devel@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
>