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

Cleanup LogManager class initialization and LogManager/LoggerContext relationship

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 7-pool, 8
    • core-libs
    • None

      LogManager class initialization is fragile: because Logger constructor calls LogManager.getLogManager, and because LogManager calls new Logger during LogManager class initialization, and because the global logger is instantiated during Logger class initialization, loading Logger.class or LogManager.class can lead to challenging issues (see for instance JDK-8021003).

      It would be good if the root and global logger could be lazily added to LogManager, so that loading LogManager.class doesn't create instances of Logger.

            dfuchs Daniel Fuchs
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: