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

Misleading WARN log events from Log4j about message factories and unexpected formatting

    Details

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

      Description

      We log misleading WARN log events from Log4j about message factories and unexpected formatting.

      For example:

      2016-05-29 18:21:46,712 main WARN The Logger com.example.foo was created with the message factory org.apache.logging.log4j.spi.MessageFactory2Adapter@46bc9802 and is now requested with the message factory org.apache.logging.log4j.m
      essage.StringFormatterMessageFactory@510e0dd2, which may create log events with unexpected formatting.
      

      This is because in 2.6, AbstractMessageFactory implements MessageFactory instead of MessageFactory2.

      This issue changes AbstractMessageFactory to implement MessageFactory2.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                garydgregory Gary Gregory
                Reporter:
                garydgregory Gary Gregory
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: