Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0.Final
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Story Points:
      5
    • Steps to Reproduce:
      Hide

      Register a custom implementation of java.util.logging.Formatter at logging.custom-formatters.KEY.attribute-class, which tries to access org.slf4j.MDC.getCopyOfContextMap(). This will always return null since the NOPMDCAdapter is used for JUL logging.

      Show
      Register a custom implementation of java.util.logging.Formatter at logging.custom-formatters.KEY.attribute-class , which tries to access org.slf4j.MDC.getCopyOfContextMap() . This will always return null since the NOPMDCAdapter is used for JUL logging.

      Description

      Currently we are using a custom log4j Layout implementation to format our logs.
      This has the downside, that not all thorntail logs will be formatted by this.
      (especially during start up)

      Therfore we looked into the way how to customize log format with thorntail.
      For this we migrated our Layout implementation to a java.util.logging.Formatter implementation and registered it here logging.custom-formatters.KEY.attribute-class.

      Unfortunetly we noticed that we are no longer able to acces MDC / ThreadContext information, since JUL doesn't provide a MDC implementation.

      I already raised a question on stackoverflow, without any feedback: https://stackoverflow.com/questions/57698333/access-mdc-information-in-custom-log-formatter-for-thorntail

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                timo.schoepflin Timo Schöpflin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: