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

def scanerrlog::ApacheErrorLog::_prepare (   self  )  [private]

Sort all the things in the right order

Definition at line 845 of file scanerrlog.py.

00845                            :
                """Sort all the things in the right order"""
                k = self.__erreurs.keys()
                k.sort(lambda x, y, l = self.__erreurs : cmp(l[y], l[x]))
                categories = []
                for i in k :
                        cpt, ld, messages = self.__erreurs[i]
                        if cpt >= self._limit :
                                km = messages.keys()
                                km.sort(lambda x, y, l = messages : cmp(l[y], l[x]))
                                catmsgs = []
                                for im in km :
                                        compteur, latestdate = messages[im]
                                        catmsgs.append({ "message" : im, "latestdate": self.__ascdate(latestdate), "number" : compteur })
                                categories.append({ "message" : i, "latestdate" : self.__ascdate(ld), "number" : cpt, "details" : catmsgs})
                        else :
                                self._underlimit = self._underlimit + cpt
                return categories

        def pdfreport(self, title = SEL_DEFAULTTITLE, outputfile = SEL_DEFAULTFILENAME, withheader = 0) : # no header needed


Generated by  Doxygen 1.6.0   Back to index