I tried to find the source code for php slow_log to understand what they are exactly doing but wasn't successful so far. Above you included 2 newlines. Are these also created by the log creator? Or where would a second log entry be added? In the above case I think the only "rubbish" you would have in your log entry would be one newline at the end?