Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6577

StringIndexOutOfBoundsException in Sling Log Web Console when creating new logger with absolute file name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Commons Log 5.0.0
    • Commons Log 5.1.0
    • Commons
    • None

    Description

      After adding a new logger via the web console exposed at /system/console/slinglog with an absolute filename (one starting with "/"), the following exception is thrown

      28.02.2017 16:47:31.300 *ERROR* [qtp455076072-280] org.apache.felix.http.jetty Exception while processing request to /system/console/slinglog (java.lang.StringIndexOutOfBoundsException: String index out of range: -42)
      java.lang.StringIndexOutOfBoundsException: String index out of range: -42
      	at java.lang.String.substring(String.java:1931)
      	at org.apache.sling.commons.log.logback.internal.SlingLogPanel.getPath(SlingLogPanel.java:791)
      	at org.apache.sling.commons.log.logback.internal.SlingLogPanel.appendOsgiConfiguredLoggerData(SlingLogPanel.java:221)
      	at org.apache.sling.commons.log.logback.internal.SlingLogPanel.render(SlingLogPanel.java:110)
      	at org.apache.sling.commons.log.webconsole.internal.LogWebConsolePlugin.renderContent(LogWebConsolePlugin.java:79)
      	at org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:194)
      

      This is related to the exception being mentioned in SLING-6482.

      Attachments

        Issue Links

          Activity

            People

              chetanm Chetan Mehrotra
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: