def commit_to_log_file(msg, log_path, entity=None): #log changes log = Log(log_path) if entity is None: log.commit_log(msg) else: log.commit_log(msg, entity)