Writes a line of text to the log file.