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

Programmatical Configuration of Log4j2 with RollingFileAppender does not honor logging classnames

    XMLWordPrintableJSON

Details

    Description

      I am trying to programmatically configure a Log4j2 logger with a Rolling File appender, and am seeing that classnames are not getting printed according to the Layouts page(https://logging.apache.org/log4j/2.x/manual/layouts.html)
      Can someone please help me understand why is it that the classname is not getting printed? Is it an existing bug with PatternLayout class?

      Test class:
      http://pastebin.com/yBQ7mGPC

      Output:
      http://pastebin.com/cnfnqauz

      Attachments

        Activity

          People

            Unassigned Unassigned
            meetyourmothers vaibhav singh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified