|
|
|
@ -4,6 +4,7 @@ import com.fr.base.io.IOFile;
|
|
|
|
|
import com.fr.base.io.XMLReadHelper; |
|
|
|
|
import com.fr.config.MarketConfig; |
|
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.web.session.SessionLocalManager; |
|
|
|
|
|
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
@ -31,6 +32,7 @@ public class ErrorInfoLogAppender extends AppenderSkeleton {
|
|
|
|
|
|
|
|
|
|
private static final int ERROR_LEN = 8; |
|
|
|
|
private static final int ERROR_STACK_TRACE = 15; |
|
|
|
|
private static final String ERROR_CODE = Toolkit.i18nText("Fine-Design_Report_Engine_ErrorCode_Prefix") + ".*?[:,:]"; |
|
|
|
|
|
|
|
|
|
// 缓存下不变的, 没必要频繁取.
|
|
|
|
|
private String username; |
|
|
|
@ -92,9 +94,8 @@ public class ErrorInfoLogAppender extends AppenderSkeleton {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String readLogID(String log) { |
|
|
|
|
String errorCode = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_ErrorCode_Prefix"); |
|
|
|
|
// 报错信息国际化不规范, 有些是中文分号, 有些是英文
|
|
|
|
|
String[] matchs = log.split(errorCode + ".*?[:,:]"); |
|
|
|
|
String[] matchs = log.split(ERROR_CODE); |
|
|
|
|
if (matchs.length <= 1) { |
|
|
|
|
return StringUtils.EMPTY; |
|
|
|
|
} |
|
|
|
|