Exemple #1
0
    def _get_and_setup_logger(self):
        logger = logging.getLogger('libcloud.compute.ssh')
        path = os.getenv('LIBCLOUD_DEBUG')

        if path:
            handler = logging.FileHandler(path)
            handler.setFormatter(ExtraLogFormatter())
            logger.addHandler(handler)
            logger.setLevel(logging.DEBUG)

        return logger
Exemple #2
0
    def _get_and_setup_logger(self):
        # type: () -> logging.Logger
        logger = logging.getLogger("libcloud.compute.ssh")
        path = os.getenv("LIBCLOUD_DEBUG")

        if path:
            handler = logging.FileHandler(path)
            handler.setFormatter(ExtraLogFormatter())
            logger.addHandler(handler)
            logger.setLevel(logging.DEBUG)

        return logger