Write events to log file.