code: def get_loglevel(level):
      
      if level == 'debug':
          return logging.DEBUG
      elif level == 'notice':
          return logging.INFO
      elif level == 'info':
          return logging.INFO
      elif level == 'warning' or level == 'warn':
          return logging.WARNING
      elif level == 'error' or level == 'err':
          return logging.ERROR
      elif level == 'critical' or level == 'crit':
          return logging.CRITICAL
      elif level == 'alert':
          return logging.CRITICAL
      elif level == 'emergency' or level == 'emerg':
          return logging.CRITICAL
      else:
          return logging.INFO
docs: return logging level object
      corresponding to a given level passed as
      a string
      @str level: name of a syslog log level
      @rtype: logging, logging level from logging module