Details
-
Bug
-
Resolution: Fixed
-
P5
-
7
-
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
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
- relates to
-
JDK-8023168 Cleanup LogManager class initialization and LogManager/LoggerContext relationship
- Closed
-
JDK-8021003 java/util/logging/Logger/getGlobal/TestGetGlobalConcurrent.java fails intermittently
- Closed