Generally you can not delete a file that is open and being written to.
This is an operating system function.
You could use dirscan to monitor the size of logs and send an alarm when something needs to be done.
But if the process never closes the file and always has it open you will need to stop the process and then delete the file some how.