Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-937

log4j to log4j2 ThreadContext (MDC)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 2.1
    • None
    • API, Core, Log4j 1.2 bridge
    • None
    • tested on Windows XP and 7

    Description

      We are using slf4j and log4j2. Also a third party library using log4j via its config file, so we have added log4j to log4j2 adaptor.

      While using MDC or directly ThreadContext, 3.party library logs (which is using log4j) doesnt pick up "context key" and directed to default route.

      3.party library have a loggerfactory class name in its config file.
      Loggerfactory implementation is pretty straight forward, it creates a logger from repository. (log4j)

      I have written another class, creates the logger from LoggerFactory (log4j2) and change 3.party properties file. Everything works fine in this case.

      So it seems the problem isnt about 3.party library but log4j to log4j2 adaptor.

      Attachments

        Activity

          People

            rgoers Ralph Goers
            Ceday CEM DAYANIK
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: