-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b96
-
Verified
It's related to JEP 264 : Platform Logging APIs.
simple code to reproduce the issue :
=========================================
Logger logger = LazyLoggers.getLogger("foo.bar", Thread.class);
Field IS_BOOTED = BootstrapLogger.class.getDeclaredField("isBooted");
IS_BOOTED.setAccessible(true);
AtomicBoolean vmBooted = new AtomicBoolean(false);
IS_BOOTED.set(null, () -> vmBooted.get());
vmBooted.getAndSet(false);
sun.util.logging.PlatformLogger.Bridge bridge = (sun.util.logging.PlatformLogger.Bridge)logger;
bridge.logp(platformLevel, "MyClass_#13", "MyMethod_#13", () -> "xyz #13");
bridge.logp(platformLevel, "MyClass_#16", "MyMethod_#16", new RuntimeException("throwable #16"), () -> "xyz #16");
=========================================
there is no "MyMethod_#13", "xyz #13" and "xyz #16", "MyMethod_#16" in the log, but "MyClass_#13" and "MyClass_#16" exist in the log.
simple code to reproduce the issue :
=========================================
Logger logger = LazyLoggers.getLogger("foo.bar", Thread.class);
Field IS_BOOTED = BootstrapLogger.class.getDeclaredField("isBooted");
IS_BOOTED.setAccessible(true);
AtomicBoolean vmBooted = new AtomicBoolean(false);
IS_BOOTED.set(null, () -> vmBooted.get());
vmBooted.getAndSet(false);
sun.util.logging.PlatformLogger.Bridge bridge = (sun.util.logging.PlatformLogger.Bridge)logger;
bridge.logp(platformLevel, "MyClass_#13", "MyMethod_#13", () -> "xyz #13");
bridge.logp(platformLevel, "MyClass_#16", "MyMethod_#16", new RuntimeException("throwable #16"), () -> "xyz #16");
=========================================
there is no "MyMethod_#13", "xyz #13" and "xyz #16", "MyMethod_#16" in the log, but "MyClass_#13" and "MyClass_#16" exist in the log.
- relates to
-
JDK-8144460 Improve the code coverage for BootstrapLogger and SimpleConsoleLogger APIs and verify bug fix JDK-8144214
-
- Closed
-