Uploaded image for project: 'JBoss Logging'
  1. JBoss Logging
  2. JBLOGGING-54

MDC entries do not appear in jboss log

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.0.GA
    • 3.0.0.Beta4-jboss-logging
    • jboss-logging-spi
    • None
    • Hide

      Include org.jboss.logging.MDC class in a test class, use MDC.put("user","this is a test") to add an entry to the MDC, write a log line then use MDC.remove("user") to remove the object from the MDC.

      Use the log pattern "%d %-5p [%c] (%t) [%X

      {user}

      %X

      {task}

      ] - %s%E%n" in the server log.

      Show
      Include org.jboss.logging.MDC class in a test class, use MDC.put("user","this is a test") to add an entry to the MDC, write a log line then use MDC.remove("user") to remove the object from the MDC. Use the log pattern "%d %-5p [%c] (%t) [%X {user} %X {task} ] - %s%E%n" in the server log.

      As per title, MDC entries do not appear in jboss log when using the log pattern "%d %-5p [%c] (%t) [%X

      {user}

      %X

      {task}

      ] - %s%E%n"

              dlloyd@redhat.com David Lloyd
              chris.jansen Chris Jansen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: