Hi,
sorry for boothering you all. I'm in the need to have a logging
optimization and i whould like to ask you all about the use of %m%n.
Due to the fact i need optimization should i use :
%m%n
or should implement my own Class/Method name finder with:
private static String getLoggingMethod() {
StackTraceElement stackTraceElements[] = Thread.currentThread().
getStackTrace();
StackTraceElement caller = stackTraceElements[3];
return caller.getMethodName();
}
and
private String getLoggingMethodClassNameIfDebug(int deep) {
if (logger.isDebugEnabled()) {
StackTraceElement stackTraceElements[] = Thread.currentThread().
getStackTrace();
StackTraceElement caller = stackTraceElements[deep];
return buildMehodNameClassNameByStackTrace(caller);
} else {
return EMPTY;
}
}
?
Thanks a lot in advice.
Best regards,
Pietro