if not test_mode:
            session.add(Log(self.state, self))
            session.merge(self)