def __enter__ ( self ) : self . logger = logging . getLogger ( 'pip.download' ) self . logger . addFilter ( self )
python logging filter self
Enable the download log filter .
def __enter__(self):
        """Enable the download log filter."""
        self.logger = logging.getLogger('pip.download')
        self.logger.addFilter(self)