Remote ConfigReader with URLConnection : LogManager « Log « Java Tutorial






import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.logging.LogManager;

public class Main {
  public static void main(String[] argv) throws Exception {
    URLConnection urlConn = null;

    InputStream inStream = null;

    LogManager manager = null;
    URL url = new URL("http://www.xyz.com/config.properties");
    urlConn = url.openConnection();
    inStream = urlConn.getInputStream();
    manager = LogManager.getLogManager();
    manager.readConfiguration(inStream);

  }
}








35.7.LogManager
35.7.1.Remote ConfigReader with URLConnection
35.7.2.Determining When the Logging Configuration Properties are Reread