title: Java Logging: Log4j Version2.x: show the method of an end-client caller (not an intermediate logging helper method)
body: <p>The following 3 posts offer answers for how to use an intermediate logging helper and still get the underlying logger to report from the method of a client to that logging helper (rather than reporting the logging helper method as the source):</p>
  
  <ul>
  <li><p><a href="https://stackoverflow.com/questions/1486233/java-logging-show-the-source-line-number-of-the-caller-not-the-logging-helper#comment58427327_1486532">Java Logging: show the source line number of the caller (not the logging helper method)</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/23880055/calling-log4js-log-methods-indirectly-from-a-helper-method#comment58427383_23881012">Calling log4j&#39;s log methods indirectly (from a helper method)</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/2905611/printing-the-source-class-in-a-log-statement-with-a-log4j-wrapper">Printing the &quot;source&quot; class in a log statement with a log4j wrapper</a></p></li>
  </ul>
  
  <p>But the seem to only offer answers for <a href="https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Category.html" rel="noreferrer">Log4j 1.2</a>, which offers the now-defunct:</p>
  
  <pre><code> Category.log(String callerFQCN, Priority level, Object message, Throwable t). 
  </code></pre>
  
  <p>There does not seem to be an obvious equivalent for <a href="https://logging.apache.org/log4j/2.0/log4j-api/apidocs/index.html" rel="noreferrer">Logger in the log4J 2.5 API</a>. </p>
  
  <p>Can anybody offer an answer compatible with direct use of Log4J 2.x ?</p>