jdk/test/java/util/logging/LoggingMXBeanTest2.java
changeset 14181 f723098d438c
parent 5506 202f599c92aa
child 14683 38921a46c62d
equal deleted inserted replaced
14180:66f6161a0bcb 14181:f723098d438c
     1 /*
     1 /*
     2  * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    40 
    40 
    41     static LoggingMXBean mbean = LogManager.getLoggingMXBean();
    41     static LoggingMXBean mbean = LogManager.getLoggingMXBean();
    42     static String LOGGER_NAME_1 = "com.sun.management.Logger";
    42     static String LOGGER_NAME_1 = "com.sun.management.Logger";
    43     static String LOGGER_NAME_2 = "com.sun.management.Logger.Logger2";
    43     static String LOGGER_NAME_2 = "com.sun.management.Logger.Logger2";
    44     static String UNKNOWN_LOGGER_NAME = "com.sun.management.Unknown";
    44     static String UNKNOWN_LOGGER_NAME = "com.sun.management.Unknown";
       
    45     static Logger logger1;
       
    46     static Logger logger2;
    45 
    47 
    46     public LoggingMXBeanTest2() throws Exception {
    48     public LoggingMXBeanTest2() throws Exception {
    47 
    49 
    48         Logger logger1 = Logger.getLogger( LOGGER_NAME_1 );
    50         logger1 = Logger.getLogger( LOGGER_NAME_1 );
    49         logger1.setLevel(Level.FINE);
    51         logger1.setLevel(Level.FINE);
    50         Logger logger2 = Logger.getLogger( LOGGER_NAME_2 );
    52         logger2 = Logger.getLogger( LOGGER_NAME_2 );
    51         logger2.setLevel(null);
    53         logger2.setLevel(null);
    52 
    54 
    53         /*
    55         /*
    54          *  Check for the existence of our new Loggers
    56          *  Check for the existence of our new Loggers
    55          */
    57          */