我想打印从at cab.ces.upgrade.controller.UpgradeRecommendationController.getPackageOffers(UpgradeRecommendationController.java:1234)
开始的堆栈跟踪。这就是我输出的方式。
**** Error Wed Jul 05 23:23:49 GMT 2017 1499297029577 /lll/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-23596/cab/ces/upgrade/manager/business/UpgradeRecommendationsBusinessManager at cab.ces.upgrade.controller.UpgradeRecommendationController.getPackageOffers(UpgradeRecommendationController.java:1234)
所以我需要删除**** Error Wed Jul 05 23:23:49 GMT 2017 1499297029577 /lll/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-23596/cab/ces/upgrade/manager/business/UpgradeRecommendationsBusinessManager
我的代码
if((strLine.contains("**** Error") )){
//|| (strLine.contains("(CreditCheckManager")
//String sPattern = "\\tat (.*)\\.(.*)\\(([^:]*):?([\\d]*)\\)";
Matcher m = p.matcher(strLine);
if(m.find()){
totCount++;
iCount++;
if((iCount==1) ){
System.out.println("Class name:- " + m.group(3));
System.out.println("Line Number:- " + m.group(4));
System.out.println();
System.out.println("VodafoneSystemException occurence count: " + exCount);
System.out.println();
System.out.println("VodafoneSystemException stack trace count: " + totCount);
}
System.out.println(strLine);