Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4397636

Logging APIs: StreamHandler constructors have wrong default level

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description



      Name: elR10090 Date: 12/13/2000



      Logging APIs specification (draft 0.55) states Level.ALL is used
      as default for StreamHandler.

      The following simple test reveals that both StreamHandler constructors
      create handlers with log level has been set to Level.INFO.

      Test.java source:

      import java.util.logging.*;

      class Test {

          public static void main(String args[]) {

              StreamHandler sh = new StreamHandler();
              System.out.println("1st log level is: " + sh.getLevel());

              sh = new StreamHandler(System.out, new SimpleFormatter());
              System.out.println("2nd log level is: " + sh.getLevel());
                      
          }

      }

      Log and test source follow:

      Test log:

      1st log level is: INFO
      2nd log level is: INFO
       
      ======================================================================

      Name: elR10090 Date: 02/01/2001


      This bug affects the following testbase_nsk test:
          nsk/logging/StreamHandler/StreamHandler/strmhnd001


      ======================================================================

      Name: elR10090 Date: 02/05/2001


      This bug also affects the following testbase_nsk test:
          nsk/logging/StreamHandler/StreamHandler_of/strmhndof001


      ======================================================================

      Name: elR10090 Date: 02/05/2001


      This bug also affects the following testbase_nsk test:
          nsk/logging/StreamHandler/setOutputStream/setoutstrm001


      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            ghamiltosunw Graham Hamilton (Inactive)
            Reporter:
            latkinsunw Latkin Latkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: