I've handled this problem 2 ways: 1) for almost realtime... using twisted and .read() file as glyph mentioned and 2) used splunk and it's functionality to send search "matching" data to a program that in turn does http notification. This is at 5 min search intervals.
As previous posters have mentioned, tail's behavior is inconsistent on different platforms. If your OS platform never changes then you could use tail -f as a process protocol. I originally started doing my work using the process protocol and tail -f but needed the software to work on 3 versions of linux and os x. The read() way of doing it was ultimately the most cross platform way I could come up with. Good luck. -rob On Tue, Sep 1, 2009 at 8:20 AM, Martin-Louis Bright<mlbri...@gmail.com> wrote: > PyInotify only allows you to detect file changes, leaving you with the task > of asynchronously sending http requests. > > -martin > > On Thu, Aug 27, 2009 at 12:19 PM, Mikhail <ter...@gmail.com> wrote: >> >> Martin-Louis Bright <mlbright <at> gmail.com> writes: >> >> > >> > >> > I am using linux, and I want the daemon to be as responsive as possible >> > to log >> events, so I think I would rather have it sit on the same box as where the >> log >> is produced. (Perhaps I'm wrong about this?) So I'm going to try Cary's >> ProcessProtocol approach, and if that doesn't work, Glyph's LoopingCall >> with a >> read() approach. >> > >> >> You can also use pyinotify to watch your log file changes. >> http://trac.dbzteam.org/pyinotify >> >> Regards, >> Mikhail >> >> >> >> _______________________________________________ >> Twisted-Python mailing list >> Twisted-Python@twistedmatrix.com >> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > > _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python