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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.6
    • API
    • 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

            rpopma Remko Popma
            rpopma Remko Popma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: