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

Logger methods taking Supplier<?> parameters should check if supplied value is Message

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: API
    • Labels:
      None

      Description

      Methods on the Logger interface that take a Supplier<?> argument currently do not correctly handle the case where the supplied value is of type Message.

      Currently, either the Message value will be wrapped in an ObjectMessage, or it will be used as one of the parameter values in a parameterized text message. In both cases, the result of Message.toString() will eventually be logged, rather than Message.getFormattedString().

        Attachments

          Activity

            People

            • Assignee:
              remkop@yahoo.com Remko Popma
              Reporter:
              remkop@yahoo.com Remko Popma
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: