Commit 426d1092 authored by yanzg's avatar yanzg

不记录系统日志

parent 8f98f5dc
...@@ -164,18 +164,28 @@ public class LogLocal implements ThreadNext.Next, InitializingBean { ...@@ -164,18 +164,28 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
/** /**
* 是否属于日志服务 * 是否属于日志服务
* *
* @param name * @param keys
* @param url
* @return * @return
*/ */
private boolean isLog(String name, String url) { private boolean isLog(String... keys) {
boolean noFilter = applicationName.matches(notFilter) || name.matches(notFilter) || url.matches(notFilter); List<String> list = new ArrayList<>();
if (noFilter) { 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; return false;
} }
return filter;
boolean isLog = applicationName.matches(filter) || name.matches(filter) || url.matches(filter);
return isLog;
} }
/** /**
......
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