//ep.getStackTrace()[0].getClassName():0为当前方法类名;1为调用者类名.
Exception ep = new Exception();
Log.d(TAG,”xxx———> Class: " + ep.getStackTrace()[0].getClassName() +
" Filename: " +ep.getStackTrace()[0].getFileName() +
" func: " + ep.getStackTrace()[0].getMethodName() +
" line: " + ep.getStackTrace()[0].getLineNumber());
作者:慢慢的燃烧
来源:CSDN
原文:https://blog.csdn.net/u010164190/article/details/80676863
版权声明:本文为博主原创文章,转载请附上博文链接!