mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-24 12:16:33 +10:00
[강운덕] [LUCYSUS-1744] 리팩토링
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@485 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.profiler.util;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class StackTraceUtil {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(StackTraceUtil.class.getName());
|
||||
|
||||
public static void printCurrentStackTrace() {
|
||||
printCurrentStackTrace(logger);
|
||||
}
|
||||
|
||||
public static void printCurrentStackTrace(Logger logger) {
|
||||
if (!logger.isLoggable(Level.INFO)) {
|
||||
return;
|
||||
}
|
||||
|
||||
StackTraceElement[] stackList = Thread.currentThread().getStackTrace();
|
||||
int length = stackList.length;
|
||||
for (int loop = 2; loop < length; loop++) {
|
||||
logger.info("***" + stackList[loop].toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user