【Android】Log info!
// 顯示此Log的Class
private static final String DEBUG_CLASS = Thread.currentThread().getStackTrace()[3].getClassName();
// 顯示Log的Method
private static final String DEBUG_METHOD = Thread.currentThread().getStackTrace()[3].getMethodName();
// 顯示此Log的行號
private static int DEBUG_LINE_NUMBER = Thread.currentThread().getStackTrace()[3].getLineNumber();
//private static String DEBUG_LOG="["+DEBUG_CLASS + "][" + DEBUG_METHOD +"][" + DEBUG_LINE_NUMBER + "]";
沒有留言:
張貼留言