Commit 168c29a7 authored by yanzg's avatar yanzg

不记录系统日志

parent 8d4a7950
......@@ -24,6 +24,8 @@ public class LogBase implements ThreadNext.Next, InitializingBean {
@Autowired
protected List<LogFeign> logFeigns;
private LogFeign logFeign;
/**
* Invoked by a BeanFactory after it has set all bean properties supplied
* (and satisfied BeanFactoryAware and ApplicationContextAware).
......@@ -56,23 +58,29 @@ public class LogBase implements ThreadNext.Next, InitializingBean {
*/
@Override
public boolean next() throws Exception {
if (true) {
cache.clear();
return true;
// if (true) {
// cache.clear();
// return true;
// }
for (LogFeign log : logFeigns) {
if (log instanceof LogFeignDefault && logFeign == null) {
logFeign = log;
} else {
logFeign = log;
}
}
while (cache.size() > 0) {
LogVo item = cache.poll();
if (item != null) {
for (LogFeign log : logFeigns) {
try {
log.save(item);
logFeign.save(item);
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
}
return true;
}
......
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