code: def WriteEventBody(self, event):
      
      if not hasattr(event, 'timestamp'):
        return
  
      row = self._GetSanitizedEventValues(event)
      try:
        self._cursor.execute(self._INSERT_QUERY, row)
      except MySQLdb.Error as exception:
        logger.warning(
            'Unable to insert into database with error: {0!s}.'.format(
                exception))
  
      self._count += 1
  
      # TODO: Experiment if committing the current transaction
      # every 10000 inserts is the optimal approach.
      if self._count % 10000 == 0:
        self._connection.commit()
        if self._set_status:
          self._set_status('Inserting event: {0:d}'.format(self._count))
docs: Writes the body of an event object to the output.
  
      Args:
        event (EventObject): event.