Can be a buffer problem? I mean the OS writes effectively to a file after some buffer is full. The process that writes this log can do similar things. It happened to me with some nasty ms application logs.
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.