< prev index next >

test/jdk/jdk/jfr/jvm/TestLogImplementation.java

Print this page
rev 51054 : imported patch 9000013-aixDisableJFR-requires.patch


  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.jfr.jvm;
  27 
  28 import jdk.jfr.internal.JVM;
  29 import jdk.jfr.internal.Logger;
  30 import jdk.jfr.internal.LogTag;
  31 import jdk.jfr.internal.LogLevel;
  32 
  33 /*
  34  * @test TestLogImplementation
  35  * @key jfr

  36  * @library /test/lib
  37  * @modules jdk.jfr/jdk.jfr.internal
  38  * @run main/othervm jdk.jfr.jvm.TestLogImplementation
  39  */
  40 public class TestLogImplementation {
  41     private static LogLevel DEFAULT_TEST_LOG_LEVEL = LogLevel.ERROR;
  42     private static LogTag JFR_LOG_TAG = LogTag.JFR;
  43 
  44     private static void assertAllLevelsForTag(LogTag tag, String message) {
  45         for (LogLevel level : LogLevel.values()) {
  46             Logger.log(tag, level, message);
  47         }
  48     }
  49 
  50     private static void assertAllTagsForLevel(LogLevel level, String message) {
  51         for (LogTag tag : LogTag.values()) {
  52             Logger.log(tag, level, message);
  53         }
  54     }
  55 




  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.jfr.jvm;
  27 
  28 import jdk.jfr.internal.JVM;
  29 import jdk.jfr.internal.Logger;
  30 import jdk.jfr.internal.LogTag;
  31 import jdk.jfr.internal.LogLevel;
  32 
  33 /**
  34  * @test TestLogImplementation
  35  * @key jfr
  36  * @requires vm.hasJFR
  37  * @library /test/lib
  38  * @modules jdk.jfr/jdk.jfr.internal
  39  * @run main/othervm jdk.jfr.jvm.TestLogImplementation
  40  */
  41 public class TestLogImplementation {
  42     private static LogLevel DEFAULT_TEST_LOG_LEVEL = LogLevel.ERROR;
  43     private static LogTag JFR_LOG_TAG = LogTag.JFR;
  44 
  45     private static void assertAllLevelsForTag(LogTag tag, String message) {
  46         for (LogLevel level : LogLevel.values()) {
  47             Logger.log(tag, level, message);
  48         }
  49     }
  50 
  51     private static void assertAllTagsForLevel(LogLevel level, String message) {
  52         for (LogTag tag : LogTag.values()) {
  53             Logger.log(tag, level, message);
  54         }
  55     }
  56 


< prev index next >