Marc Lehmann wrote:
I don't know, it depends entirely on how you define "logfile rotation", which probably relies on whatever program does the actual rotation.
As in the file gets deleted and/or truncated, and the event driven application watching the file gets notified by some mechanism that this has happened.
We were talking about timestamp resolution, and what to do about it. And this is cetrainly being explained in the docs.
Er, no, I think you have misunderstood my question.I am not talking at all about timestamp resolution, a concept which you are 100% correct is adequately explained in the docs.
What I am talking about is the detection of when a logfile is moved/deleted/truncated and a new logfile is started from scratch.
From my event driven app, I need to detect when this has occurred, and close and reopen the logfile in question. (tail -F, in other words)
I don't think so - but it all depends on how you define it. Note that the only sure way of detecting logfile rotation in the general case is to let the program that rotates the log tell you. Eberything else is just heuristics.
Hmmm...Both inotify and kqueue can (apparently) detect file deletion/renaming events, although it seems that libev does not (yet) expose these events via any API as yet.
Regards, Graham --
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
