(self,path,date,e=100)
return log_list,n
return : log_list,log_num
return : log_list,log_num
return : log_list log_num
def getLogs(self,path,date,e=100):#"/Users/baidu/documents/workspace/baidu_syslog/src/file/2016-04-01/events-.1459440014158"
        '''
            return : log_list,log_num
        '''
        
        n=0
        log_once_list=[]
        log_list=[]
        flag=0
        wft=WordsFrequencyTree()
        with open(path) as IN:
            for log in IN:
                log = log.strip()
                log = re.sub("\d+(\.\d)?$", "", log)
                log = log.strip()
                log = json.loads(log)
                if not log:
                    continue
                #getMsg()∑µªÿ“ª∏ˆ‘™◊È(switch_type,words_list)
                log_once_list.append(self.getMsg(log))
                
                n+=1
                if n>e:
                    n=0
                    flag=1
                    wft.do(log_once_list,dd)
                    log_once_list=[]
                    print (path,'cut list')
            
            wft.do(log_once_list,dd)
#                log_list.append(log_once_list)

#         print "input_count:",n
        return log_list,n
def getLogs ( self , path , date , e = 100 ) : #"/Users/baidu/documents/workspace/baidu_syslog/src/file/2016-04-01/events-.1459440014158" n = 0 log_once_list = [ ] log_list = [ ] flag = 0 wft = WordsFrequencyTree ( ) with open ( path ) as IN : for log in IN : log = log . strip ( ) log = re . sub ( "\d+(\.\d)?$" , "" , log ) log = log . strip ( ) log = json . loads ( log ) if not log : continue #getMsg()∑µªÿ“ª∏ˆ‘™◊È(switch_type,words_list) log_once_list . append ( self . getMsg ( log ) ) n += 1 if n > e : n = 0 flag = 1 wft . do ( log_once_list , dd ) log_once_list = [ ] print ( path , 'cut list' ) wft . do ( log_once_list , dd ) #                log_list.append(log_once_list) #         print "input_count:",n return log_list , n