title: Is it right approach to implement LOGGER with support of Thread.currentThread().getStackTrace()?
body: <p>In order to avoid the too many LOGGER instance of each Class, I am trying to implement with the one common LOGGER instance by using Thread.currentThread().getStackTrace() to get the class name and method name. Is it advisable to use Thread.currentThread().getStackTrace() method in Java 1.8/1.9?</p>
  
  <pre><code>//My LoggerService Class
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
  public class LoggerService {
  private static Logger LOGGER = LoggerFactory.getLogger(LoggerService.class);
  
      static String getClazz() {
          return Thread.currentThread().getStackTrace()[4].getClassName()+"::";
      }
  
      static String getMethod() {
          return Thread.currentThread().getStackTrace()[4].getMethodName()+"::";
      }
  
     public static void info(Object message) {
          if (LOGGER.isInfoEnabled()) {
              LOGGER.info(getClazz() +getMethod()+ message);
          }
      }
  }
  
  //Usage
  class LoggerTest{ 
     public void loggerTest(){
        LoggerService.info("my message");
     }
  }
  </code></pre>