The code you use is unnecessarily cumbersome. A simple unlink call should do the trick:
unlink( $log_file );
But let's find out what is going wrong. The file exists because you enter a loop in which print instructions are executed. It seems that calling unlink returns false, because the output is "11", not "111".
So, my gut says this should be a file permissions issue. Are you sure the web user has permission to delete the file? Can you show us permissions to access the folder, for example by running ls -la on the command line and pasting the output?
source share