diff --git a/iwla.py b/iwla.py index 2a2431e..0bd6278 100755 --- a/iwla.py +++ b/iwla.py @@ -267,10 +267,12 @@ class IWLA(object): mod.hook(*args) def isPage(self, request): + self.logger.debug("Is page %s" % (request)) for e in conf.pages_extensions: if request.endswith(e): + self.logger.debug("True") return True - + self.logger.debug("False") return False def _appendHit(self, hit): @@ -627,6 +629,7 @@ class IWLA(object): def _newHit(self, hit): if not self.domain_name_re.match(hit['server_name']): + self.logger.debug("Not in domain %s" % (hit)) return False t = self._decodeTime(hit) @@ -637,7 +640,9 @@ class IWLA(object): self.current_analysis = self._deserialize(self.getDBFilename(t)) or self._clearVisits() self.analyse_started = True else: - if time.mktime(t) <= time.mktime(cur_time): + if not self.analyse_started and\ + time.mktime(t) <= time.mktime(cur_time): + self.logger.debug("Not in time") return False self.analyse_started = True if cur_time.tm_mon != t.tm_mon: