Flush logs to HTTP connection after each write

This fixes tailing logs.

@lmars for review.