in reply to is File Opened or Not
You could have the program that writes the logs lock them and then check to see if the file is locked (remember to | LOCK_NB so the flock call won't hang). Alternately, if you are on a unix machine, you could parse the output of lsof to see if a file is open.