code: @Nonnull
      public static String determineHostName(@Nonnull final String defaultValue) {
          checkNotNull(defaultValue, "Unable to use default value of null for hostname");
          if (!OPT_HOSTNAME.isPresent()) {
              try {
                  return determineHostName(); // this will get and save it.
              } catch (final UnknownHostException e) {
                  log.error("Unable to find hostname " + e.getMessage(), e); // exception to pick up in logsig
              }
          }
          return OPT_HOSTNAME.or(defaultValue);
      }
docs: Same as determineHostName, but will use default value instead of throwing UnknownHostException
  
  @param defaultValue    The default hostname to use in the event one is not preset.
  @return The detected hostname if present, or the default value.