Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-725

Logging System fails silently when config filename has an unsupported extension

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 1.0.8
    • 1.0.6
    • logback-classic
    • None

    Description

      Currently, if logback.configurationFile is set to a filename which does not end in 'xml' or 'groovy', the logging system will fail to initialize, but will not emit any errors indicating the problem. Even with logback.debug enabled, the system is completely silent.

      This is due to the absence of a catch-all 'else' in:

      • ch.qos.logback.classic.util.ContextInitializer.configureByResource(...)
      • ch.qos.logback.classic.turbo.ReconfigureOnChangeFilter.ReconfiguringThread.run()

      At the very least, it would be easy to add an 'else' which logs an error about the filename.

      On the other hand, a bit more involved solution would be to fallback to inspecting the contents of the file for something recognizable (like <?xml....)

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            RS017991 Ryan Scheidter
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: