logback-android/src/main/java/ch/qos/logback/core/joran/GenericConfigurator.java
public final void doConfigure(URL url) throws JoranException {
    InputStream in = null;
    try {
      informContextOfURLUsedForConfiguration(getContext(), url);
      URLConnection urlConnection = url.openConnection();
      // per http://jira.qos.ch/browse/LBCORE-105
      // per http://jira.qos.ch/browse/LBCORE-127
      urlConnection.setUseCaches(false);

      // this closes the stream for us
      in = urlConnection.getInputStream();
      doConfigure(in, url.toExternalForm());
    } catch (IOException ioe) {
      String errMsg = "Could not open URL [" + url + "].";
      addError(errMsg, ioe);
      throw new JoranException(errMsg, ioe);
    } finally {
      CloseUtil.closeQuietly(in);
    }
  }
public final void doConfigure(URL url) throws JoranException {
    InputStream in = null;
    try {
      informContextOfURLUsedForConfiguration(getContext(), url);
      URLConnection urlConnection = url.openConnection();
      // per http://jira.qos.ch/browse/LBCORE-105
      // per http://jira.qos.ch/browse/LBCORE-127
      urlConnection.setUseCaches(false);

      // this closes the stream for us
      in = urlConnection.getInputStream();
      doConfigure(in, url.toExternalForm());
    } catch (IOException ioe) {
      String errMsg = "Could not open URL [" + url + "].";
      addError(errMsg, ioe);
      throw new JoranException(errMsg, ioe);
    } finally {
      CloseUtil.closeQuietly(in);
    }
  }
public final void doConfigure ( URL url ) throws JoranException { InputStream in = null ; try { informContextOfURLUsedForConfiguration ( getContext ( ) , url ) ; URLConnection urlConnection = url . openConnection ( ) ; // per http://jira.qos.ch/browse/LBCORE-105 // per http://jira.qos.ch/browse/LBCORE-127 urlConnection . setUseCaches ( false ) ; // this closes the stream for us in = urlConnection . getInputStream ( ) ; doConfigure ( in , url . toExternalForm ( ) ) ; } catch ( IOException ioe ) { String errMsg = "Could not open URL [" + url + "]." ; addError ( errMsg , ioe ) ; throw new JoranException ( errMsg , ioe ) ; } finally { CloseUtil . closeQuietly ( in ) ; } }
Configures logback with the configuration XML read from a file,
located at the given URL

@param url URL to the file, containing the configuration XML
@throws JoranException configuration error occurred
Configures logback with the configuration XML read from a file located at the given URL