def METHOD_NAME(self, item_list):
    RET = {"RETURN_KEY1": 0}
    try:
        for item in item_list:
            record_type = item.get('record_type', None)
            if record_type == 'file':
                file_mode = item.get('mode', None)
                file_log = item.get('log', None)
                file_path = item.get('path', None)
                file_max_size = item.get('file_max_size', 0)
                if file_path is None:
                    record_syslog('%%REBOOT_CAUSE-3-EXCEPTION: record type is file, but path is none.')
                    continue
                if file_max_size > 0:
                    file_size = 0
                    if os.path.exists(file_path):
                        file_size = os.path.getsize(file_path) // file_max_size
                    if file_size >= 1:
                        reocrd_cmd = "mv %s %s_bak" % (file_path, file_path)
                        status, output = exec_os_cmd(reocrd_cmd)
                        if status:
                            record_syslog(
                                '%%REBOOT_CAUSE-3-EXCEPTION: exec cmd %s failed, %s' %
                                (reocrd_cmd, output))
                if file_mode == 'cover':
                    operate_cmd = ">"
                elif file_mode == 'add':
                    operate_cmd = ">>"
                else:
                    RET["RETURN_KEY1"] = -1
                    record_syslog('%%REBOOT_CAUSE-3-EXCEPTION: file record mode:%s not support.' % file_mode)
                    continue
                create_dir = "mkdir -p %s" % os.path.dirname(file_path)
                status, ret_t = wb_os_system(create_dir)
                if status != 0:
                    RET["RETURN_KEY1"] = -1
                    record_syslog(
                        '%%REBOOT_CAUSE-3-EXCEPTION: create %s failed, msg: %s' %
                        (os.path.dirname(file_path), ret_t))
                    continue
                status, date = wb_os_system("date")
                if status != 0 or len(date) == 0:
                    RET["RETURN_KEY1"] = -1
                    record_syslog('%%REBOOT_CAUSE-3-EXCEPTION: get date failed.')
                    continue
                reocrd_cmd = "echo %s %s %s %s" % (file_log, date, operate_cmd, file_path)
                status, ret_t = wb_os_system(reocrd_cmd)
                if status != 0:
                    RET["RETURN_KEY1"] = -1
                    record_syslog('%%REBOOT_CAUSE-3-EXCEPTION: get date failed, msg: %s' % ret_t)
                    continue
                wb_os_system('sync')
            else:
                RET["RETURN_KEY1"] = -1
                record_syslog('%%REBOOT_CAUSE-3-EXCEPTION: record_type:%s not support.' % record_type)
                continue
    except Exception as e:
        RET["RETURN_KEY1"] = -1
        record_syslog('%%REBOOT_CAUSE-3-EXCEPTION: reboot cause record error. msg: %s.' % (str(e)))
    if RET["RETURN_KEY1"] == 0:
        return True
    return False