title: Why log4j 2 does not log method name for app and unit tests
body: <p>My Log4j2 config file looks like:</p>
  
  <pre><code>&lt;Appenders&gt;
    &lt;RollingRandomAccessFile name="APP_LOG_APPENDER" fileName="${sys:baseLogPath}/${appLogFileName}.log"
              filePattern="${sys:baseLogPath}/backups/$${date:yyyy-MM}/${appLogFileName}-%d{yyyy-MM-dd}-%i.log.gz" immediateFlush="false"&gt;
      &lt;PatternLayout&gt;
        &lt;Pattern&gt;%d{yyyy-MM-dd HH:mm:ss.SSS} [Thread: %t] %level [%c][%M] - %msg%n&lt;/Pattern&gt;
      &lt;/PatternLayout&gt;
      &lt;Policies&gt;
        &lt;TimeBasedTriggeringPolicy /&gt;
        &lt;SizeBasedTriggeringPolicy size="50 MB" /&gt;
      &lt;/Policies&gt;
      &lt;DefaultRolloverStrategy max="20"/&gt;
    &lt;/RollingRandomAccessFile&gt;
  &lt;/Appenders&gt;
  &lt;Loggers&gt;
    &lt;Root level="debug" additivity="false"&gt;
      &lt;AppenderRef ref="APP_LOG_APPENDER" /&gt;
    &lt;/Root&gt;
  &lt;/Loggers&gt;
  </code></pre>
  
  <p>Logger statements in class <code>MyClass</code></p>
  
  <pre><code>public class MyClass {
    private final static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MyClass.class);
    public void someMethod() {
      logger.debug("Some sample string at DEBUG level....");
      logger.info("Some sample string at INFO level....");
      logger.warn("Some sample string at WARN level....");
      logger.error("Some sample string at ERROR level....");
    }
  }
  </code></pre>
  
  <p>The log messages are coming out as:</p>
  
  <pre><code>2016-04-11 12:32:31.245 [Thread: main] DEBUG [com.demo.MyClass][] - Some sample string at DEBUG level....
  2016-04-11 12:32:31.245 [Thread: main] INFO [com.demo.MyClass][] - Some sample string at INFO level....
  2016-04-11 12:32:31.245 [Thread: main] WARN [com.demo.MyClass][] - Some sample string at WARN level....
  2016-04-11 12:32:31.245 [Thread: main] ERROR [com.demo.MyClass][] - Some sample string at ERROR level....
  </code></pre>
  
  <p>I am using log4j2-2.5 version and corresponding SLF4J API.</p>
  
  <p>Could someone help me understand why is this happening?</p>