|
|
|
@ -10,11 +10,27 @@ import cokr.xit.base.syslog.service.bean.LogFilter;
|
|
|
|
|
*/
|
|
|
|
|
@Component("logFilter")
|
|
|
|
|
public class FimsLogFilter extends LogFilter {
|
|
|
|
|
private String[] ignore = {
|
|
|
|
|
"login.do", "logout.do",
|
|
|
|
|
"/user/", "/authority/", "/code/", "/menu/", "/syslog/", "/error/",
|
|
|
|
|
"/stat/stat01/010/info.do"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean customFilter(ServiceLog log) {
|
|
|
|
|
switch (log.getType()) {
|
|
|
|
|
case ServiceLog.LOG_INOUT:
|
|
|
|
|
case ServiceLog.DOWNLOAD: return true;
|
|
|
|
|
case ServiceLog.WEB:
|
|
|
|
|
String url = blankIfEmpty(log.getUrl());
|
|
|
|
|
for (String str: ignore) {
|
|
|
|
|
if (url.contains(str))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if ("modifySvg".equals(log.getMethodName()))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
default: return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|