Write events to the log