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

FAILED_INITIALIZATION case in LoggerFactory.getILoggerFactory swallows root exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 1.7.22
    • Fix Version/s: 1.7.24
    • Component/s: None
    • Labels:
      None

      Description

      I have a hard time triaging an IllegalStateException thrown by LoggerFactory.getILoggerFactory that has been reported by a user (Eclipse Bug 510487) as the root exception is not wrapped by the IllegalStateException: https://github.com/qos-ch/slf4j/blob/v_1.7.22/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java#L422.

      AFAICT, that exception is only logged to the console (https://github.com/qos-ch/slf4j/blob/v_1.7.22/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java#L194). This makes error reports sent by an automatic error reporting system (like the one employed for the Eclipse IDE) less useful, as the crucial information won't be included automatically.

      Hence, it would be great if SLF4J could hold onto the Throwable for a bit and than wrap it in the final IllegalStateException.

        Attachments

          Activity

            People

            • Assignee:
              ceki Ceki Gülcü
              Reporter:
              sewe Andreas Sewe
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: