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

Some log messages will be discarded when VM is bootstrapping.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs

      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.

            mli Hamlin Li
            mli Hamlin Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: