def _configure_root_logger(self):
        """Initialise logging system"""
        root_logger = logging.getLogger()
        root_logger.setLevel(logging.DEBUG)
        if self.args.verbose:
            handler = logging.StreamHandler(sys.stdout)
        else:
            handler = logging.handlers.RotatingFileHandler(
                common.LOG_FILE,
                maxBytes=common.MAX_LOG_SIZE,
                backupCount=common.MAX_LOG_COUNT
            )
            handler.setLevel(logging.INFO)
        handler.setFormatter(logging.Formatter(common.LOG_FORMAT))
        root_logger.addHandler(handler)
def _configure_root_logger ( self ) : root_logger = logging . getLogger ( ) root_logger . setLevel ( logging . DEBUG ) if self . args . verbose : handler = logging . StreamHandler ( sys . stdout ) else : handler = logging . handlers . RotatingFileHandler ( common . LOG_FILE , maxBytes = common . MAX_LOG_SIZE , backupCount = common . MAX_LOG_COUNT ) handler . setLevel ( logging . INFO ) handler . setFormatter ( logging . Formatter ( common . LOG_FORMAT ) ) root_logger . addHandler ( handler )
Initialise logging system