Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-375

SLF4JBridgeHandler lost when JUL rootLogger is garbage collected

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.7.21
    • jul-to-slf4j
    • None
    • major

    Description

      We haven't yet been able to reproduce it reliably, but it seems very likely that the SLF4JBridgeHandler may get lost when the JUL rootLogger is being garbage collected, because no strong reference to the rootLogger is retained.

      https://docs.oracle.com/javase/7/docs/api/java/util/logging/LogManager.html#addLogger(java.util.logging.Logger):

      "The application should retain its own reference to the Logger object to avoid it being garbage collected. The LogManager may only retain a weak reference."

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            kutzi Christoph Kutzinski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: