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

Some log messages will be discarded when VM is bootstrapping.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: