Log4j - Java 1.4 - Show Method Name on log file
Nom fonction function name log logger
Use the
new Exception().getStackTrace()[0].getMethodName()
Method to write the method name on logger file
public String getIfRGRExistByLTA(String refLTA, String sens) log.debug(new Exception().getStackTrace()[0].getMethodName() +" : begin : " + refLTA + ", " + sens); .../... if (log.isDebugEnabled()) { log.debug(new Exception().getStackTrace()[0].getMethodName() + " : end : " + ifRGRExistByLTA); } return ifRGRExistByLTA; }
ll.ll..
ecrie le resultat du log
ll.ll..