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

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ggregory Gary D. Gregory
            ggregory Gary D. Gregory
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment