Some log messages will be discarded when VM is bootstrapping.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: