Commit 6ed0ffd1 authored by yanzg's avatar yanzg

修复异常提醒,从而正确的跟踪异常信息

parent 1d12de05
......@@ -2,7 +2,6 @@ package com.yanzuoguang.log;
import com.yanzuoguang.util.exception.ExceptionHelper;
import com.yanzuoguang.util.thread.ThreadNext;
import com.yanzuoguang.util.vo.CloudConfig;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;
......@@ -21,12 +20,9 @@ public class LogBase implements ThreadNext.Next, InitializingBean {
* 缓存队列
*/
protected volatile LinkedBlockingQueue<LogInfoVo> cache = new LinkedBlockingQueue<>();
private final CloudConfig cloudConfig;
private final LogFeignBase logFeign;
public LogBase(CloudConfig cloudConfig, LogFeignDefault logFeignDefault, Optional<LogFeign> logFeign) {
this.cloudConfig = cloudConfig;
public LogBase(LogFeignDefault logFeignDefault, Optional<LogFeign> logFeign) {
if (logFeign.isPresent()) {
this.logFeign = logFeign.get();
} else {
......@@ -48,9 +44,7 @@ public class LogBase implements ThreadNext.Next, InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
// 判断是否要记录日志
if (cloudConfig.isLogBase()) {
ThreadNext.start(this, "save log error");
}
ThreadNext.start(this, "save log error");
}
/**
......
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