Commit 168c29a7 authored by yanzg's avatar yanzg

不记录系统日志

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