Write log line-by-line