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

java.util.logging.Logger.getGlobal().info() doesn't log without configuration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P5
    • 8
    • 7
    • core-libs
    • b98
    • x86
    • windows_7
    • Verified

    Description

      FULL PRODUCT VERSION :
      java version "1.7.0_05"
      Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
      Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 7

      A DESCRIPTION OF THE PROBLEM :
      This code cannot any log message in console.
      The global logger should have Level.INFO, and should deligates the root logger as parent.
      The root logger should have console handler in default settings.

      ---
      import java.util.logging.Logger;

      public class GlobalLogger01 {
          public static void main(String[] args) {
      Logger.getGlobal().info("start");
          }
      }
      ---


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile above source code, then run the code.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Log message is on the console.
      ACTUAL -
      No message is on the console.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Nothing

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.util.logging.Logger;

      public class GlobalLogger01 {
          public static void main(String[] args) {
      Logger.getGlobal().info("start");
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Before Logger.getGlobal().info(), insert code Logger.getGlobal().setLevel(Level.INFO)
      ILW:
      Impact: Low
      Nothing has changed from 7u4.
      Likelyhood: L
      Customers use custom loggers, not the default global one.
      Workaround: L
      Just explicitly set the correct logging level.

      -> p5

      Attachments

        Issue Links

          Activity

            People

              dfuchs Daniel Fuchs
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: