def getThreadPrefix(self): ''' nicely compute the name prefix for a thread if we have the default name (just from the config name) - avoid to have this twice @return: ''' n = self.getName() if "AVN%s" % n == self.getConfigName(): return "[ %s]-%s" % (AVNLog.getThreadId(), n) else: return "[ %s]-%s-%s" % (AVNLog.getThreadId(), self.getConfigName(), n)
def log_message(self, format, *args): if self.id is None: self.id = AVNLog.getThreadId() if self.id is None: self.id = "?" threading.current_thread().setName("[%s]HTTPHandler" % (self.id)) AVNLog.debug(format, *args)