code: def attach(self):
          
          log_recording = LogRecording(parent_object_id=self.parent_object_id, created_at=datetime.utcnow())
          self.log_recording_dao.remove(self.parent_object_id)
          self.log_recording_dao.update(log_recording)
  
          formatter = logging.Formatter(fmt='%(asctime)s %(levelname)-8s %(message)s',
                                        datefmt='%Y-%m-%d %H:%M:%S')
          self.setFormatter(formatter)
          self.logger.addHandler(self)
docs: method clears existing log_recorder entries for given parent_object_id,
              creates a new one and attaches this handler to the logger
              from this moment every log record will be recorded in the DB