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

Creating logger with name mixing dollar and dot fail

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 1.0.13
    • logback-classic
    • None

    Description

      We got
      java.lang.IllegalArgumentException: For logger [***] child name [*** passed as parameter, may not include '.' after index***

      To fix this LoggerNameUtil.getSeparatorIndexOf should be modified to return the index of dollar if before index of dot

          public static int getSeparatorIndexOf(final String name, final int fromIndex) {
              int i = name.indexOf(CoreConstants.DOT, fromIndex);
              int j = name.indexOf(CoreConstants.DOLLAR, fromIndex);
              if (i != -1 && j != -1) {
                  return Math.min(i, j);
              } else {
                  return Math.max(i, j);
              }
          }
      

      Attachments

        Activity

          People

            logback-dev Logback dev list
            gaellalire Gael Lalire
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: