java.util.logging.LogRecord#getResourceBundleName ( )源码实例Demo

下面列出了java.util.logging.LogRecord#getResourceBundleName ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: jdk8u-dev-jdk   文件: TestLogrbResourceBundle.java
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
    lastParams = record.getParameters();
    lastThrown = record.getThrown();
    lastMessage = record.getMessage();
}
 
源代码2 项目: jdk8u-jdk   文件: TestLoggerBundleSync.java
@Override
public synchronized void publish(LogRecord record) {
    Object[] params = record.getParameters();
    // Each GetRB thread has its own handler, but since they
    // log into the same logger, each handler may receive
    // messages emitted by other threads.
    // This means that GetRB#2.handler may receive a message
    // emitted by GetRB#1 at a time where the resource bundle
    // was still null.
    // To avoid falling into this trap, the GetRB thread passes
    // 'this' as argument to the messages it logs - which does
    // allow us here to ignore messages that where not emitted
    // by our own GetRB.this thread...
    if (params.length == 1) {
        if (params[0] == GetRB.this) {
            // The message was emitted by our thread.
            count++;
            rb = record.getResourceBundle();
            rbName = record.getResourceBundleName();
        } else {
            // The message was emitted by another thread: just
            // ignore it, as it may have been emitted at a time
            // where the resource bundle was still null, and
            // processing it may overwrite the 'rb' and 'rbName'
            // recorded from the message emitted by our own thread.
            if (VERBOSE) {
                System.out.println("Ignoring message logged by " + params[0]);
            }
            ignoreLogCount.incrementAndGet();
        }
    } else {
        ignoreLogCount.incrementAndGet();
        System.err.println("Unexpected message received");
    }
}
 
源代码3 项目: dragonwell8_jdk   文件: TestLoggerBundleSync.java
@Override
public synchronized void publish(LogRecord record) {
    Object[] params = record.getParameters();
    // Each GetRB thread has its own handler, but since they
    // log into the same logger, each handler may receive
    // messages emitted by other threads.
    // This means that GetRB#2.handler may receive a message
    // emitted by GetRB#1 at a time where the resource bundle
    // was still null.
    // To avoid falling into this trap, the GetRB thread passes
    // 'this' as argument to the messages it logs - which does
    // allow us here to ignore messages that where not emitted
    // by our own GetRB.this thread...
    if (params.length == 1) {
        if (params[0] == GetRB.this) {
            // The message was emitted by our thread.
            count++;
            rb = record.getResourceBundle();
            rbName = record.getResourceBundleName();
        } else {
            // The message was emitted by another thread: just
            // ignore it, as it may have been emitted at a time
            // where the resource bundle was still null, and
            // processing it may overwrite the 'rb' and 'rbName'
            // recorded from the message emitted by our own thread.
            if (VERBOSE) {
                System.out.println("Ignoring message logged by " + params[0]);
            }
            ignoreLogCount.incrementAndGet();
        }
    } else {
        ignoreLogCount.incrementAndGet();
        System.err.println("Unexpected message received");
    }
}
 
源代码4 项目: jdk8u_jdk   文件: TestLogrbResourceBundle.java
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
    lastParams = record.getParameters();
    lastThrown = record.getThrown();
    lastMessage = record.getMessage();
}
 
源代码5 项目: TencentKona-8   文件: TestLoggerBundleSync.java
@Override
public synchronized void publish(LogRecord record) {
    Object[] params = record.getParameters();
    // Each GetRB thread has its own handler, but since they
    // log into the same logger, each handler may receive
    // messages emitted by other threads.
    // This means that GetRB#2.handler may receive a message
    // emitted by GetRB#1 at a time where the resource bundle
    // was still null.
    // To avoid falling into this trap, the GetRB thread passes
    // 'this' as argument to the messages it logs - which does
    // allow us here to ignore messages that where not emitted
    // by our own GetRB.this thread...
    if (params.length == 1) {
        if (params[0] == GetRB.this) {
            // The message was emitted by our thread.
            count++;
            rb = record.getResourceBundle();
            rbName = record.getResourceBundleName();
        } else {
            // The message was emitted by another thread: just
            // ignore it, as it may have been emitted at a time
            // where the resource bundle was still null, and
            // processing it may overwrite the 'rb' and 'rbName'
            // recorded from the message emitted by our own thread.
            if (VERBOSE) {
                System.out.println("Ignoring message logged by " + params[0]);
            }
            ignoreLogCount.incrementAndGet();
        }
    } else {
        ignoreLogCount.incrementAndGet();
        System.err.println("Unexpected message received");
    }
}
 
源代码6 项目: jdk8u60   文件: TestLoggerBundleSync.java
@Override
public synchronized void publish(LogRecord record) {
    Object[] params = record.getParameters();
    // Each GetRB thread has its own handler, but since they
    // log into the same logger, each handler may receive
    // messages emitted by other threads.
    // This means that GetRB#2.handler may receive a message
    // emitted by GetRB#1 at a time where the resource bundle
    // was still null.
    // To avoid falling into this trap, the GetRB thread passes
    // 'this' as argument to the messages it logs - which does
    // allow us here to ignore messages that where not emitted
    // by our own GetRB.this thread...
    if (params.length == 1) {
        if (params[0] == GetRB.this) {
            // The message was emitted by our thread.
            count++;
            rb = record.getResourceBundle();
            rbName = record.getResourceBundleName();
        } else {
            // The message was emitted by another thread: just
            // ignore it, as it may have been emitted at a time
            // where the resource bundle was still null, and
            // processing it may overwrite the 'rb' and 'rbName'
            // recorded from the message emitted by our own thread.
            if (VERBOSE) {
                System.out.println("Ignoring message logged by " + params[0]);
            }
            ignoreLogCount.incrementAndGet();
        }
    } else {
        ignoreLogCount.incrementAndGet();
        System.err.println("Unexpected message received");
    }
}
 
源代码7 项目: hottub   文件: TestLoggerBundleSync.java
@Override
public synchronized void publish(LogRecord record) {
    Object[] params = record.getParameters();
    // Each GetRB thread has its own handler, but since they
    // log into the same logger, each handler may receive
    // messages emitted by other threads.
    // This means that GetRB#2.handler may receive a message
    // emitted by GetRB#1 at a time where the resource bundle
    // was still null.
    // To avoid falling into this trap, the GetRB thread passes
    // 'this' as argument to the messages it logs - which does
    // allow us here to ignore messages that where not emitted
    // by our own GetRB.this thread...
    if (params.length == 1) {
        if (params[0] == GetRB.this) {
            // The message was emitted by our thread.
            count++;
            rb = record.getResourceBundle();
            rbName = record.getResourceBundleName();
        } else {
            // The message was emitted by another thread: just
            // ignore it, as it may have been emitted at a time
            // where the resource bundle was still null, and
            // processing it may overwrite the 'rb' and 'rbName'
            // recorded from the message emitted by our own thread.
            if (VERBOSE) {
                System.out.println("Ignoring message logged by " + params[0]);
            }
            ignoreLogCount.incrementAndGet();
        }
    } else {
        ignoreLogCount.incrementAndGet();
        System.err.println("Unexpected message received");
    }
}
 
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
    lastParams = record.getParameters();
    lastThrown = record.getThrown();
    lastMessage = record.getMessage();
}
 
@Override
public synchronized void publish(LogRecord record) {
    Object[] params = record.getParameters();
    // Each GetRB thread has its own handler, but since they
    // log into the same logger, each handler may receive
    // messages emitted by other threads.
    // This means that GetRB#2.handler may receive a message
    // emitted by GetRB#1 at a time where the resource bundle
    // was still null.
    // To avoid falling into this trap, the GetRB thread passes
    // 'this' as argument to the messages it logs - which does
    // allow us here to ignore messages that where not emitted
    // by our own GetRB.this thread...
    if (params.length == 1) {
        if (params[0] == GetRB.this) {
            // The message was emitted by our thread.
            count++;
            rb = record.getResourceBundle();
            rbName = record.getResourceBundleName();
        } else {
            // The message was emitted by another thread: just
            // ignore it, as it may have been emitted at a time
            // where the resource bundle was still null, and
            // processing it may overwrite the 'rb' and 'rbName'
            // recorded from the message emitted by our own thread.
            if (VERBOSE) {
                System.out.println("Ignoring message logged by " + params[0]);
            }
            ignoreLogCount.incrementAndGet();
        }
    } else {
        ignoreLogCount.incrementAndGet();
        System.err.println("Unexpected message received");
    }
}
 
源代码10 项目: openjdk-jdk9   文件: TestLogrbResourceBundle.java
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
    lastParams = record.getParameters();
    lastThrown = record.getThrown();
    lastMessage = record.getMessage();
}
 
源代码11 项目: openjdk-jdk9   文件: TestLoggerBundleSync.java
@Override
public synchronized void publish(LogRecord record) {
    Object[] params = record.getParameters();
    // Each GetRB thread has its own handler, but since they
    // log into the same logger, each handler may receive
    // messages emitted by other threads.
    // This means that GetRB#2.handler may receive a message
    // emitted by GetRB#1 at a time where the resource bundle
    // was still null.
    // To avoid falling into this trap, the GetRB thread passes
    // 'this' as argument to the messages it logs - which does
    // allow us here to ignore messages that where not emitted
    // by our own GetRB.this thread...
    if (params.length == 1) {
        if (params[0] == GetRB.this) {
            // The message was emitted by our thread.
            count++;
            rb = record.getResourceBundle();
            rbName = record.getResourceBundleName();
        } else {
            // The message was emitted by another thread: just
            // ignore it, as it may have been emitted at a time
            // where the resource bundle was still null, and
            // processing it may overwrite the 'rb' and 'rbName'
            // recorded from the message emitted by our own thread.
            if (VERBOSE) {
                System.out.println("Ignoring message logged by " + params[0]);
            }
            ignoreLogCount.incrementAndGet();
        }
    } else {
        ignoreLogCount.incrementAndGet();
        System.err.println("Unexpected message received");
    }
}
 
源代码12 项目: jdk8u-jdk   文件: TestLogrbResourceBundle.java
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
    lastParams = record.getParameters();
    lastThrown = record.getThrown();
    lastMessage = record.getMessage();
}
 
源代码13 项目: TencentKona-8   文件: TestSetResourceBundle.java
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
}
 
源代码14 项目: jdk8u_jdk   文件: TestSetResourceBundle.java
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
}
 
源代码15 项目: jdk8u60   文件: TestSetResourceBundle.java
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
}
 
源代码16 项目: openjdk-8   文件: TestLoggerBundleSync.java
@Override
public synchronized void publish(LogRecord record) {
    rb = record.getResourceBundle();
    rbName = record.getResourceBundleName();
}
 
源代码17 项目: jdk8u-jdk   文件: TestSetResourceBundle.java
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
}
 
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
}
 
源代码19 项目: jdk8u-dev-jdk   文件: TestSetResourceBundle.java
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
}
 
源代码20 项目: hottub   文件: TestSetResourceBundle.java
@Override
public void publish(LogRecord record) {
    lastBundle = record.getResourceBundle();
    lastBundleName = record.getResourceBundleName();
}