def enable(self): """enable logging on all threads.""" assert(self.fh is not None) sys.settrace(self.__callback) threading.settrace(self.__callback)