def convert_level(self, record):
        """Converts a logging level into a logbook level."""
        level = record.levelno
        if level >= logging.CRITICAL:
            return levels.CRITICAL
        if level >= logging.ERROR:
            return levels.ERROR
        if level >= logging.WARNING:
            return levels.WARNING
        if level >= logging.INFO:
            return levels.INFO
        return levels.DEBUG
def convert_level ( self , record ) : level = record . levelno if level >= logging . CRITICAL : return levels . CRITICAL if level >= logging . ERROR : return levels . ERROR if level >= logging . WARNING : return levels . WARNING if level >= logging . INFO : return levels . INFO return levels . DEBUG
Converts a logging level into a logbook level.