示例#1
0
 def flush_audit_log(self, h):
     for log in self.cmd_logs:
         row = models.AuditLog(user=self.user,
                               host=h,
                               log_type=log[2],
                               content=log[1],
                               date=log[0])
         row.save()
     self.cmd_logs = []
     return True
示例#2
0
文件: main.py 项目: zhangnq/CrazyEye
    def flush_audit_log(self, h):

        for log in self.cmd_logs:

            row = models.AuditLog(session=self.session_track,
                                  user=self.login_user.userprofile,
                                  host=h,
                                  action_type=log[2],
                                  cmd=log[1],
                                  date=log[0])
            row.save()
        self.cmd_logs = []
        return True