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

Bracket with MDC expression breaks formatting

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • logback-classic
    • None

    Description

      With this pattern, with a bracket after the %X expression :
      <pattern>BEFORE %X

      {req.remoteHost}) AFTER %n</pattern>
      I have the following (broken) log messages :
      BEFORE 127.0.0.1BEFORE 127.0.0.1BEFORE 127.0.0.1

      With this pattern, without a bracket after the %X expression :
      <pattern>BEFORE %X{req.remoteHost}

      AFTER %n</pattern>
      I have the following (nice) log messages :
      BEFORE 127.0.0.1 AFTER
      BEFORE 127.0.0.1 AFTER

      BEFORE 127.0.0.1 AFTER

      Attachments

        Activity

          People

            logback-dev Logback dev list
            hasalex Alexis Hassler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: