Commit 426d1092 authored by yanzg's avatar yanzg

不记录系统日志

parent 8f98f5dc
......@@ -164,18 +164,28 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
/**
* 是否属于日志服务
*
* @param name
* @param url
* @param keys
* @return
*/
private boolean isLog(String name, String url) {
boolean noFilter = applicationName.matches(notFilter) || name.matches(notFilter) || url.matches(notFilter);
if (noFilter) {
private boolean isLog(String... keys) {
List<String> list = new ArrayList<>();
list.add(this.applicationName);
for (String item : keys) {
list.add(item);
}
// 是否排除
boolean notFilter = false;
// 是否过滤
boolean filter = false;
for (String item : list) {
String lower = item.toLowerCase();
notFilter = notFilter || lower.matches(this.notFilter);
filter = filter || lower.matches(this.filter);
}
if (notFilter) {
return false;
}
boolean isLog = applicationName.matches(filter) || name.matches(filter) || url.matches(filter);
return isLog;
return filter;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment