enhancement #I5CBYT 框架内多次打印错误日志,希望可以关闭或调整打印次数
This commit is contained in:
parent
84852f7a71
commit
a40dc6fe84
|
@ -187,10 +187,11 @@ public class FlowExecutor {
|
|||
throw new ConfigErrorException("parse error, please check liteflow config property");
|
||||
}
|
||||
} catch (CyclicDependencyException e) {
|
||||
LOG.error(e.getMessage(), e);
|
||||
LOG.error(e.getMessage());
|
||||
throw e;
|
||||
} catch (ChainDuplicateException e) {
|
||||
LOG.error(e.getMessage());
|
||||
LOG.error(e.getMessage(), e);
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
String errorMsg = StrUtil.format("init flow executor cause error for path {},reason: {}", rulePathList, e.getMessage());
|
||||
|
@ -459,6 +460,8 @@ public class FlowExecutor {
|
|||
if (ObjectUtil.isNotNull(chain)) {
|
||||
String errMsg = StrUtil.format("[{}]:chain[{}] execute error on slot[{}]", slot.getRequestId(), chain.getChainName(), slotIndex);
|
||||
LOG.error(errMsg, e);
|
||||
}else{
|
||||
LOG.error(e.getMessage(), e);
|
||||
}
|
||||
slot.setException(e);
|
||||
} finally {
|
||||
|
|
|
@ -106,7 +106,7 @@ public abstract class NodeComponent{
|
|||
self.onError();
|
||||
}catch (Exception ex){
|
||||
String errMsg = StrUtil.format("[{}]:component[{}] onError method happens exception",slot.getRequestId(),this.getDisplayName());
|
||||
LOG.error(errMsg, ex);
|
||||
LOG.error(errMsg);
|
||||
}
|
||||
throw e;
|
||||
} finally {
|
||||
|
|
|
@ -183,7 +183,7 @@ public class FlowBus {
|
|||
nodeMap.put(nodeId, node);
|
||||
} catch (Exception e) {
|
||||
String error = StrUtil.format("component[{}] register error", StrUtil.isEmpty(name)?nodeId:StrUtil.format("{}({})",nodeId,name));
|
||||
LOG.error(error, e);
|
||||
LOG.error(error);
|
||||
throw new ComponentCannotRegisterException(error);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,10 +135,10 @@ public class Node implements Executable,Cloneable{
|
|||
//如果组件覆盖了isContinueOnError方法,返回为true,那即便出了异常,也会继续流程
|
||||
if (instance.isContinueOnError()) {
|
||||
String errorMsg = MessageFormat.format("[{0}]:component[{1}] cause error,but flow is still go on", slot.getRequestId(),id);
|
||||
LOG.error(errorMsg,e);
|
||||
LOG.error(errorMsg);
|
||||
} else {
|
||||
String errorMsg = MessageFormat.format("[{0}]:component[{1}] cause error,error:{2}",slot.getRequestId(),id,e.getMessage());
|
||||
LOG.error(errorMsg,e);
|
||||
LOG.error(errorMsg);
|
||||
throw e;
|
||||
}
|
||||
} finally {
|
||||
|
|
|
@ -130,7 +130,7 @@ public class ExecutorHelper {
|
|||
return executorService;
|
||||
}
|
||||
}catch (Exception e){
|
||||
LOG.error(e.getMessage(), e);
|
||||
LOG.error(e.getMessage());
|
||||
throw new ThreadExecutorServiceCreateException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class LiteFlowProxyUtil {
|
|||
throw new RuntimeException();
|
||||
}catch (Exception e){
|
||||
String errMsg = StrUtil.format("Error while proxying bean[{}]",bean.getClass().getName());
|
||||
LOG.error(errMsg, e);
|
||||
LOG.error(errMsg);
|
||||
throw new ComponentProxyErrorException(errMsg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue