def load_logfile_level():
 if ('DIGITS_MODE_TEST' in os.environ):
  return logging.DEBUG
 elif ('DIGITS_LOGFILE_LEVEL' in os.environ):
  level = os.environ['DIGITS_LOGFILE_LEVEL'].strip().lower()
  if (level == 'debug'):
   return logging.DEBUG
  elif (level == 'info'):
   return logging.INFO
  elif (level == 'warning'):
   return logging.WARNING
  elif (level == 'error'):
   return logging.ERROR
  elif (level == 'critical'):
   return logging.CRITICAL
  else:
   raise ValueError(('Invalid value "%s" for logfile_level. Set DIGITS_LOGFILE_LEVEL to fix your configuration.' % level))
 else:
  return logging.INFO

def load_logfile_level ( ) : if ( 'DIGITS_MODE_TEST' in os . environ ) : return logging . DEBUG elif ( 'DIGITS_LOGFILE_LEVEL' in os . environ ) : level = os . environ [ 'DIGITS_LOGFILE_LEVEL' ] . strip ( ) . lower ( ) if ( level == 'debug' ) : return logging . DEBUG elif ( level == 'info' ) : return logging . INFO elif ( level == 'warning' ) : return logging . WARNING elif ( level == 'error' ) : return logging . ERROR elif ( level == 'critical' ) : return logging . CRITICAL else : raise ValueError ( ( 'Invalid value "%s" for logfile_level. Set DIGITS_LOGFILE_LEVEL to fix your configuration.' % level ) ) else : return logging . INFO
return the configured logging level .