Java Code Examples for sun.util.logging.PlatformLogger#finest()

The following examples show how to use sun.util.logging.PlatformLogger#finest() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HttpsClient.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 *  Same as previous constructor except using a Proxy
 */
HttpsClient(SSLSocketFactory sf, URL url, Proxy proxy,
            int connectTimeout)
    throws IOException {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
         logger.finest("Creating new HttpsClient with url:" + url + " and proxy:" + proxy +
         " with connect timeout:" + connectTimeout);
    }
    this.proxy = proxy;
    setSSLSocketFactory(sf);
    this.proxyDisabled = true;

    this.host = url.getHost();
    this.url = url;
    port = url.getPort();
    if (port == -1) {
        port = getDefaultPort();
    }
    setConnectTimeout(connectTimeout);
    openServer();
}
 
Example 2
Source File: HttpsClient.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 *  Same as previous constructor except using a Proxy
 */
HttpsClient(SSLSocketFactory sf, URL url, Proxy proxy,
            int connectTimeout)
    throws IOException {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
         logger.finest("Creating new HttpsClient with url:" + url + " and proxy:" + proxy +
         " with connect timeout:" + connectTimeout);
    }
    this.proxy = proxy;
    setSSLSocketFactory(sf);
    this.proxyDisabled = true;

    this.host = url.getHost();
    this.url = url;
    port = url.getPort();
    if (port == -1) {
        port = getDefaultPort();
    }
    setConnectTimeout(connectTimeout);
    openServer();
}
 
Example 3
Source File: HttpsClient.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 *  Same as previous constructor except using a Proxy
 */
HttpsClient(SSLSocketFactory sf, URL url, Proxy proxy,
            int connectTimeout)
    throws IOException {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
         logger.finest("Creating new HttpsClient with url:" + url + " and proxy:" + proxy +
         " with connect timeout:" + connectTimeout);
    }
    this.proxy = proxy;
    setSSLSocketFactory(sf);
    this.proxyDisabled = true;

    this.host = url.getHost();
    this.url = url;
    port = url.getPort();
    if (port == -1) {
        port = getDefaultPort();
    }
    setConnectTimeout(connectTimeout);
    openServer();
}
 
Example 4
Source File: HttpsClient.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 *  Same as previous constructor except using a Proxy
 */
HttpsClient(SSLSocketFactory sf, URL url, Proxy proxy,
            int connectTimeout)
    throws IOException {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
         logger.finest("Creating new HttpsClient with url:" + url + " and proxy:" + proxy +
         " with connect timeout:" + connectTimeout);
    }
    this.proxy = proxy;
    setSSLSocketFactory(sf);
    this.proxyDisabled = true;

    this.host = url.getHost();
    this.url = url;
    port = url.getPort();
    if (port == -1) {
        port = getDefaultPort();
    }
    setConnectTimeout(connectTimeout);
    openServer();
}
 
Example 5
Source File: HttpsClient.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 *  Same as previous constructor except using a Proxy
 */
HttpsClient(SSLSocketFactory sf, URL url, Proxy proxy,
            int connectTimeout)
    throws IOException {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
         logger.finest("Creating new HttpsClient with url:" + url + " and proxy:" + proxy +
         " with connect timeout:" + connectTimeout);
    }
    this.proxy = proxy;
    setSSLSocketFactory(sf);
    this.proxyDisabled = true;

    this.host = url.getHost();
    this.url = url;
    port = url.getPort();
    if (port == -1) {
        port = getDefaultPort();
    }
    setConnectTimeout(connectTimeout);
    openServer();
}
 
Example 6
Source File: HttpsClient.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 *  Same as previous constructor except using a Proxy
 */
HttpsClient(SSLSocketFactory sf, URL url, Proxy proxy,
            int connectTimeout)
    throws IOException {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
         logger.finest("Creating new HttpsClient with url:" + url + " and proxy:" + proxy +
         " with connect timeout:" + connectTimeout);
    }
    this.proxy = proxy;
    setSSLSocketFactory(sf);
    this.proxyDisabled = true;

    this.host = url.getHost();
    this.url = url;
    port = url.getPort();
    if (port == -1) {
        port = getDefaultPort();
    }
    setConnectTimeout(connectTimeout);
    openServer();
}
 
Example 7
Source File: HttpsClient.java    From openjsse with GNU General Public License v2.0 6 votes vote down vote up
/**
 *  Same as previous constructor except using a Proxy
 */
HttpsClient(SSLSocketFactory sf, URL url, Proxy proxy,
            int connectTimeout)
    throws IOException {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
         logger.finest("Creating new HttpsClient with url:" + url + " and proxy:" + proxy +
         " with connect timeout:" + connectTimeout);
    }
    this.proxy = proxy;
    setSSLSocketFactory(sf);
    this.proxyDisabled = true;

    this.host = url.getHost();
    this.url = url;
    port = url.getPort();
    if (port == -1) {
        port = getDefaultPort();
    }
    setConnectTimeout(connectTimeout);
    openServer();
}
 
Example 8
Source File: NTLMAuthenticationProxy.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NTLMAuthenticationProxy: " + e);
    }
}
 
Example 9
Source File: NTLMAuthenticationProxy.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NTLMAuthenticationProxy: " + e);
    }
}
 
Example 10
Source File: Negotiator.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
private static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NegotiateAuthentication: " + e);
    }
}
 
Example 11
Source File: NTLMAuthenticationProxy.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NTLMAuthenticationProxy: " + e);
    }
}
 
Example 12
Source File: Negotiator.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
private static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NegotiateAuthentication: " + e);
    }
}
 
Example 13
Source File: NTLMAuthenticationProxy.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NTLMAuthenticationProxy: " + e);
    }
}
 
Example 14
Source File: Negotiator.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
private static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NegotiateAuthentication: " + e);
    }
}
 
Example 15
Source File: NTLMAuthenticationProxy.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NTLMAuthenticationProxy: " + e);
    }
}
 
Example 16
Source File: Negotiator.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NegotiateAuthentication: " + e);
    }
}
 
Example 17
Source File: SystemLoggerConfigTest.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static void test(String name, String step, String ext)
        throws IOException {

    System.out.println("\n*** Testing " + name + step + ext);

    final String systemName1a = "system.logger.one.a." + name + step + ext;
    final String systemName1b = "system.logger.one.b." + name + step + ext;
    final String appName1a = "system.logger.one.a." + name + step;
    final String appName1b = "system.logger.one.b." + name + step;
    final String msg1a = "logger name: " + systemName1a;
    final String msg1b = "logger name: " + systemName1b;
    final String systemName2 = "system.logger.two." + name + step + ext;
    final String appName2 = "system.logger.two." + name + step;
    final String msg2 = "logger name: " + systemName2;
    final String systemName3 = "system.logger.three." + name + step + ext;
    final String appName3 = "system.logger.three." + name + step;
    final String msg3 = "logger name: " + systemName3;
    List<LogRecord> records;

    System.out.println("\n[Case #1] Creating platform logger: " + systemName1a);
    PlatformLogger system1a = createPlatformLogger(systemName1a);
    System.out.println("    Creating platform logger: " + systemName1b);
    PlatformLogger system1b = createPlatformLogger(systemName1b);
    System.out.println("    Adding handler on root logger...");
    TestHandler test1 = new TestHandler();
    Logger.getLogger("").addHandler(test1);

    System.out.println("    Creating and configuring app logger: " + appName1a
            + ", " + appName1b);
    Logger app1a = Logger.getLogger(appName1a);
    app1a.setLevel(Level.INFO);
    Logger app1b = Logger.getLogger(appName1b);
    app1b.setLevel(Level.INFO);
    assertFalse(system1a.isLoggable(PlatformLogger.Level.FINEST),
            "Unexpected level for " + system1a);
    System.out.println("    Configuring root logger...");
    Logger.getLogger("").setLevel(Level.FINEST);
    System.out.println("    Logging through system logger: " + systemName1a);
    system1a.finest(msg1a);
    Reference.reachabilityFence(app1a);
    records = test1.drain();
    assertEquals(0, records.size(), "Unexpected size for " + records.toString());
    System.out.println("    Logging through system logger: " + systemName1b);
    system1b.finest(msg1b);
    Reference.reachabilityFence(app1b);
    records = test1.drain();
    assertEquals(0, records.size(), "Unexpected size for " + records.toString());
    Logger.getLogger("system.logger.one.a").finest("system.logger.one.a");
    records = test1.drain();
    assertEquals("system.logger.one.a", records.get(0).getMessage(), "Unexpected message: ");
    Logger.getLogger("").setLevel(Level.INFO);
    Logger.getLogger("system.logger.one.a").finest("system.logger.one.a");
    records = test1.drain();
    assertEquals(0, records.size(), "Unexpected size for " + records.toString());

    Reference.reachabilityFence(system1a);
    Reference.reachabilityFence(system1b);

    System.out.println("\n[Case #2] Creating system logger: " + systemName2);
    Logger system2 = createSystemLogger(systemName2);
    System.out.println("    Creating app logger: " + appName2);
    Logger app2 = Logger.getLogger(appName2);
    System.out.println("    Configuring app logger...");
    TestHandler test2 = new TestHandler();
    app2.setLevel(Level.ALL);
    app2.setUseParentHandlers(false);
    app2.addHandler(test2);
    System.out.println("    Logging through system logger: " + systemName2);
    system2.finest(msg2);
    records = test2.drain();
    assertEquals(1, records.size(), "Unexpected size for " + records.toString());
    assertEquals(msg2, records.get(0).getMessage(), "Unexpected message: ");
    records = test1.drain();
    assertEquals(0, records.size(), "Unexpected size for " + records.toString());

    Reference.reachabilityFence(app2);
    Reference.reachabilityFence(system2);

    System.out.println("\n[Case #3] Creating app logger: " + appName3);
    Logger app3 = Logger.getLogger(appName3);
    System.out.println("    Configuring app logger...");
    TestHandler test3 = new TestHandler();
    app3.setLevel(Level.ALL);
    app3.setUseParentHandlers(false);
    app3.addHandler(test3);
    System.out.println("    Creating system logger: " + systemName3);
    Logger system3 = createSystemLogger(systemName3);
    System.out.println("    Logging through system logger: " + systemName3);
    system3.finest(msg3);
    records = test3.drain();
    assertEquals(1, records.size(), "Unexpected size for " + records.toString());
    assertEquals(msg3, records.get(0).getMessage(), "Unexpected message: ");
    records = test1.drain();
    assertEquals(0, records.size(), "Unexpected size for " + records.toString());

    Reference.reachabilityFence(app3);
    Reference.reachabilityFence(system3);
    System.gc();

}
 
Example 18
Source File: Negotiator.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NegotiateAuthentication: " + e);
    }
}
 
Example 19
Source File: Negotiator.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NegotiateAuthentication: " + e);
    }
}
 
Example 20
Source File: Negotiator.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
private static void finest(Exception e) {
    PlatformLogger logger = HttpURLConnection.getHttpLogger();
    if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
        logger.finest("NegotiateAuthentication: " + e);
    }
}