code: public static UtilLoggingLevel toLevel(final int val,
                                 final UtilLoggingLevel defaultLevel) {
          switch (val) {
              case SEVERE_INT:
                  return SEVERE;
  
              case WARNING_INT:
                  return WARNING;
  
              case INFO_INT:
                  return INFO;
  
              case CONFIG_INT:
                  return CONFIG;
  
              case FINE_INT:
                  return FINE;
  
              case FINER_INT:
                  return FINER;
  
              case FINEST_INT:
                  return FINEST;
  
              default:
                  return defaultLevel;
          }
      }
docs: Convert an integer passed as argument to a level. If the
  conversion fails, then this method returns the specified default.
  @param val numeric value.
  @param defaultLevel level to be returned if no level matches
  numeric value.
  @return matching level or default level.