Beispiel #1
0
class LogCatcher(LineReceiver):
    
    def __init__(self,solrAddr,norm):
       # self.setLineMode()
        self.logi = LogIndexer(solrAddr)
        self.ln = lognormalizer.LogNormalizer(norm)
        
    def connectionMade(self):
        self.sendLine("connected")
        print "Client connected"
    
    def ConnectionLost(self,reason):
        print "connection lost"
       
    def lineReceived(self,line):  
        mylog = {'raw':line} 
        self.ln.lognormalize(mylog)
        print mylog
        self.logi.index(mylog)
Beispiel #2
0
 def __init__(self,solrAddr,norm):
    # self.setLineMode()
     self.logi = LogIndexer(solrAddr)
     self.ln = lognormalizer.LogNormalizer(norm)