Logo Search packages:      
Sourcecode: scanerrlog version File versions  Download package

def scanerrlog::ApacheErrorLog::__append (   self,
  numericdate,
  errorline 
) [private]

Append each line of the error_log file to the internal structure

Definition at line 821 of file scanerrlog.py.

00821                                                    :
                """Append each line of the error_log file to the internal structure"""
                erreur = string.split(errorline, ':')
                errmsg = string.strip(erreur[0])
                reste = string.strip(string.join(erreur[1:], ':'))
                if self.__erreurs.has_key(errmsg) :
                        compteur, nmdate, messages = self.__erreurs[errmsg]
                        if reste :
                                if messages.has_key(reste) :
                                        cpt, mdate = messages[reste]
                                        if (numericdate != None) and (mdate < numericdate) :
                                                mdate = numericdate     # we keep latest date
                                        messages[reste] = (cpt + 1, mdate)
                                else :
                                        messages[reste] = (1, numericdate)
                        if (numericdate != None) and (nmdate < numericdate) :
                                nmdate = numericdate    # we keep latest date
                        self.__erreurs[errmsg] = (compteur + 1, nmdate, messages)
                else :
                        if reste :
                                self.__erreurs[errmsg] = (1, numericdate, {reste : (1, numericdate)})
                        else :
                                self.__erreurs[errmsg] = (1, numericdate, { })

        def _prepare(self) :


Generated by  Doxygen 1.6.0   Back to index