initial event logging. Storing events into the DB