Java Code Examples for jdk.jfr.internal.JVM#log()

The following examples show how to use jdk.jfr.internal.JVM#log() . 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: TestLogImplementation.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void assertLogLevelUnderflow() {
    try {
        JVM.log(JFR_LOG_TAG.ordinal(), 0, (String)null);
    } catch (IllegalArgumentException ex) {
        // Expected
    }
}
 
Example 2
Source File: TestLogImplementation.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void assertLogLevelOverflow() {
    try {
        JVM.log(JFR_LOG_TAG.ordinal(), LogLevel.ERROR.ordinal() + 1, (String)null);
    } catch (IllegalArgumentException ex) {
        // Expected
    }
}
 
Example 3
Source File: TestLogImplementation.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void assertLogTagUnderflow() {
    try {
        JVM.log(JFR_LOG_TAG.ordinal() - 1, DEFAULT_TEST_LOG_LEVEL.ordinal(), (String)null);
    } catch (IllegalArgumentException ex) {
        // Expected
    }
}
 
Example 4
Source File: TestLogImplementation.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void assertLogTagOverflow() {
    try {
        JVM.log(10000, DEFAULT_TEST_LOG_LEVEL.ordinal(), (String)null);
    } catch (IllegalArgumentException ex) {
        // Expected
    }
}
 
Example 5
Source File: TestLogImplementation.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static void assertLogLevelUnderflow() {
    try {
        JVM.log(JFR_LOG_TAG.ordinal(), 0, (String)null);
    } catch (IllegalArgumentException ex) {
        // Expected
    }
}
 
Example 6
Source File: TestLogImplementation.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static void assertLogLevelOverflow() {
    try {
        JVM.log(JFR_LOG_TAG.ordinal(), LogLevel.ERROR.ordinal() + 1, (String)null);
    } catch (IllegalArgumentException ex) {
        // Expected
    }
}
 
Example 7
Source File: TestLogImplementation.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static void assertLogTagUnderflow() {
    try {
        JVM.log(JFR_LOG_TAG.ordinal() - 1, DEFAULT_TEST_LOG_LEVEL.ordinal(), (String)null);
    } catch (IllegalArgumentException ex) {
        // Expected
    }
}
 
Example 8
Source File: TestLogImplementation.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static void assertLogTagOverflow() {
    try {
        JVM.log(10000, DEFAULT_TEST_LOG_LEVEL.ordinal(), (String)null);
    } catch (IllegalArgumentException ex) {
        // Expected
    }
}