syslog to app

Gorman, John John.Gorman@pegs.com
Thu, 12 Oct 2000 08:11:47 -0700


I take it that when you mean rotated, the old file is moved out
and a new log file is put in place.

If that is so, then have a routine that periodically stats the file
if the inode has changed, then you know that a new log file was
rotated and process accordingly.

John

|-----Original Message-----
|From: der.hans [mailto:PLUG@LuftHans.com]
|Sent: Wednesday, October 11, 2000 11:53 PM
|To: PLUG-Developers
|Subject: syslog to app
|
|
|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
|