JDK-8144214 : Some log messages will be discarded when VM is bootstrapping.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.logging
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-11-30
  • Updated: 2016-08-24
  • Resolved: 2015-12-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b96Fixed
Related Reports
Relates :  
Description
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.
Comments
http://cr.openjdk.java.net/~mli/8144214/webrev.00/
01-12-2015

The reason is that in jdk.internal.logger.BootstrapLogger.java, Line 392, logger.log(platformLevel, sourceClass, sourceMethod, thrown, msgSupplier); Line 394, logger.log(platformLevel, sourceClass, sourceMethod, msgSupplier); These 2 lines intend to call SimpleConsoleLogger::logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, Supplier<String> msgSupplier) and SimpleConsoleLogger::logp(PlatformLogger.Level level, String sourceClass, String sourceMethod, Throwable thrown, Supplier<String> msgSupplier) but in fact they call SimpleConsoleLogger::log(PlatformLogger.Level level, String msg, Object... params). ======================================== solution is as below : diff -r 74bc089000c8 src/java.base/share/classes/jdk/internal/logger/BootstrapLogger.java --- a/src/java.base/share/classes/jdk/internal/logger/BootstrapLogger.java Mon Sep 28 08:42:06 2015 -0700 +++ b/src/java.base/share/classes/jdk/internal/logger/BootstrapLogger.java Sun Nov 29 01:05:03 2015 -0800 @@ -389,9 +389,9 @@ } else { if (msgSupplier != null) { if (thrown != null) { - logger.log(platformLevel, sourceClass, sourceMethod, thrown, msgSupplier); + logger.logp(platformLevel, sourceClass, sourceMethod, thrown, msgSupplier); } else { - logger.log(platformLevel,sourceClass, sourceMethod, msgSupplier); + logger.logp(platformLevel, sourceClass, sourceMethod, msgSupplier); } } else { // BootstrapLoggers are never localized so we can safely
30-11-2015

fix in hand, be internally reviewed.
30-11-2015