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

%contextName with HTMLLayout produces empty logfiles

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 0.9.18
    • 0.9.15
    • logback-classic
    • None

    Description

      Hello Logback team,

      I encountered a unexpected behavior when trying to print out the log context name in the html output.

      I configured a FileAppender with the following layout:

      <layout class="ch.qos.logback.classic.html.HTMLLayout">
      <Pattern>%d

      {HH:mm:ss.SSS}

      %mdc

      {refId}

      %contextName%msg</Pattern>
      </layout>

      With this pattern, non of the log messages end up in the file. The output completely stops after the table header.
      If I remove "%contextName" from the pattern, I get my log messages written to the file as expected.

      Could you please have a look at this issue.
      Thank you in advance for your help.

      Kind regards,
      Rick

      Attachments

        Activity

          People

            tony19 Tony Trinh
            rick Rick Janda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: