opt:去除不必要的错误日志记录,修改错误日志大小限制。

This commit is contained in:
2024-04-25 10:20:02 +08:00
parent dff03b54fe
commit 8951d9e171
39 changed files with 126 additions and 127 deletions

View File

@@ -217,7 +217,7 @@ public class HomeServiceImpl implements HomeService {
returnjo.put("result", homeInfo);
return returnjo;
} catch (Exception e) {
log.error("queryHomePage-查询首页:{}", e.getMessage());
//log.error("queryHomePage-查询首页:{}", e.getMessage());
throw new BadRequestException(e.getMessage() == null ? "queryHomePage:" + LangUtils.getMsgLanguage("CommunicationFail", null) : "queryHomePage:" + e.getMessage());
}
}

View File

@@ -99,7 +99,7 @@ public class TaskServiceServiceImpl implements TaskService {
returnjo.put("rest_pointcode", rest_pointcode);
returnjo.put("result", arr);
} catch (Exception e) {
log.error("queryPoint-获取点位:{}", e.getMessage());
log.error("queryPoint-获取点位失败:{}", e.getMessage());
throw new BadRequestException(e.getMessage() == null ? "queryPoint:" + LangUtils.getMsgLanguage("CommunicationFail", null) : "queryPoint:" + e.getMessage());
}
return returnjo;
@@ -220,7 +220,7 @@ public class TaskServiceServiceImpl implements TaskService {
returnjo.put("desc", LangUtils.getMsgLanguage("OperationSuccess", null));
return returnjo;
} catch (Exception e) {
log.error("confirmPoint-下发任务:{}", e.getMessage());
log.error("confirmPoint-下发任务失败:{}", e.getMessage());
throw new BadRequestException(e.getMessage() == null ? "confirmPoint:" + LangUtils.getMsgLanguage("CommunicationFail", null) : "confirmPoint:" + e.getMessage());
}
}

View File

@@ -24,7 +24,7 @@ public class RosUtil{
return ros;
}
catch(Exception e) {
log.error("Ros连接异常----------------------------------------" + e.getMessage());
//log.error("Ros连接异常----------------------------------------" + e.getMessage());
throw new BadRequestException(e.getMessage());
}
}

View File

@@ -87,7 +87,7 @@ public class SendHomeWebSocketServer {
@OnError
public void onError(Session session, Throwable error) {
log.error("发生错误");
//log.error("发生错误");
webSocketSet.remove(session);
error.printStackTrace();
}

View File

@@ -87,14 +87,14 @@ public class WebSocketServer {
try {
item.sendMessage(message);
} catch (IOException e) {
log.error(e.getMessage(), e);
//log.error(e.getMessage(), e);
}
}
}
@OnError
public void onError(Session session, Throwable error) {
log.error("发生错误");
//log.error("发生错误");
error.printStackTrace();
}

View File

@@ -34,13 +34,13 @@ public class RestBusinessTemplate{
else{
errorMsg = e.getMessage();
}
log.error(e.getErrorMsg());
//log.error(e.getErrorMsg());
ResultCode code = e.getCode() == null ? ResultCode.FAILED : e.getCode();
result.setCode(code.getCode());
result.setDesc(errorMsg);
}
catch(Exception e) {
log.error("execute error", e);
//log.error("execute error", e);
result.setCode(ResultCode.FAILED.getCode());
result.setDesc(LangUtils.getMsgLanguage("OperationFailed", null) + ":" + e.getMessage());
}
@@ -67,13 +67,13 @@ public class RestBusinessTemplate{
else{
errorMsg = e.getMessage();
}
log.error(e.getErrorMsg());
//log.error(e.getErrorMsg());
ResultCode code = e.getCode() == null ? ResultCode.FAILED : e.getCode();
result.setCode(code.getCode());
result.setDesc(errorMsg);
}
catch(Exception e) {
log.error("execute error", e);
//log.error("execute error", e);
result.setCode(ResultCode.FAILED.getCode());
result.setDesc(LangUtils.getMsgLanguage("OperationFailed", null) + ":" + e);
}
@@ -88,13 +88,13 @@ public class RestBusinessTemplate{
result.setDesc(LangUtils.getMsgLanguage("OperationSuccess", null));
}
catch(BizCoreException e) {
log.error("", e);
//log.error("", e);
ResultCode code = e.getCode() == null ? ResultCode.FAILED : e.getCode();
result.setCode(code.getCode());
result.setDesc(StringUtils.isBlank(e.getMessage()) ? LangUtils.getMsgLanguage("OperationFailed", null): e.getMessage());
}
catch(Exception e) {
log.error("execute error", e);
//log.error("execute error", e);
result.setCode(ResultCode.FAILED.getCode());
result.setDesc(e.getMessage());
}

View File

@@ -95,11 +95,10 @@ public class AsyncTaskExecutePool implements AsyncConfigurer{
return threadPoolTaskExecutor;
}
@Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
return (throwable, method, objects) -> {
log.error("====" + throwable.getMessage() + "====", throwable);
log.error("exception method:" + method.getName());
//log.error("====" + throwable.getMessage() + "====", throwable);
//log.error("exception method:" + method.getName());
};
}
}

View File

@@ -166,14 +166,14 @@ public class WQLCore {
isSuccess = true;
if (null == jxls) {
isSuccess = false;
log.error("【WQLCore】开发模式table定义文件读取错误... WQLCore.loadXLS Failure");
//log.error("【WQLCore】开发模式table定义文件读取错误... WQLCore.loadXLS Failure");
return isSuccess;
}
//读取指定目录下的wql文件包含.q和.wql
if (isSuccess) {
isSuccess = WQLCore.loadWQL_Iterator(wqlPattern);
if (!isSuccess) {
log.error("【WQLCore】开发模式WQL文件读取错误... WQLCore.loadWQL Failure");
//log.error("【WQLCore】开发模式WQL文件读取错误... WQLCore.loadWQL Failure");
return isSuccess;
}
}
@@ -290,7 +290,7 @@ public class WQLCore {
}
}
} catch (Exception e) {
log.error("【WQLCore】loadXLS_Encoded error:" + e.getMessage());
//log.error("【WQLCore】loadXLS_Encoded error:" + e.getMessage());
e.printStackTrace();
}
return jxlss;
@@ -319,7 +319,7 @@ public class WQLCore {
jxlss.add(jxls);
}
} catch (Exception e) {
log.error("【WQLCore】loadXLS_Original error:" + e.getMessage());
//log.error("【WQLCore】loadXLS_Original error:" + e.getMessage());
e.printStackTrace();
}
return jxlss;
@@ -456,7 +456,7 @@ public class WQLCore {
//0、加载代码模型
boolean isLoadSuccess = WQLEngine.loadModule(jxlss, 3);
if (!isLoadSuccess) {
log.error("【WQLCore】代码模型加载错误... WQLEngine.loadModule Failure");
//log.error("【WQLCore】代码模型加载错误... WQLEngine.loadModule Failure");
return isLoadSuccess;
} else {
log.info("【WQLCore】代码模型加载成功... WQLEngine.loadModule Success");
@@ -465,7 +465,7 @@ public class WQLCore {
//1、加载表索引
isLoadSuccess = WQLEngine.loadTableIndex(jxlss, 4);
if (!isLoadSuccess) {
log.error("【WQLCore】表索引加载错误... WQLEngine.loadTableIndex Failure");
//log.error("【WQLCore】表索引加载错误... WQLEngine.loadTableIndex Failure");
return isLoadSuccess;
} else {
log.info("【WQLCore】表索引加载成功... WQLEngine.loadTableIndex Success");
@@ -474,7 +474,7 @@ public class WQLCore {
//2、加载数据类型如果没有jwdk则不处理
isLoadSuccess = WQLEngine.loadDBType(jwdk, 2);
if (!isLoadSuccess) {
log.error("【WQLCore】数据类型加载错误... WQLEngine.loadDBType Failure");
//log.error("【WQLCore】数据类型加载错误... WQLEngine.loadDBType Failure");
return isLoadSuccess;
} else {
log.info("【WQLCore】数据类型加载成功... WQLEngine.loadDBType Success");
@@ -483,7 +483,7 @@ public class WQLCore {
//3、加载所有表
ArrayList<String> tbnames = WQLEngine.loadTables(jxlss, 5);
if (null == tbnames) {
log.error("【WQLCore】WDK基础表文件加载错误... WQLEngine.loadTables Failure");
//log.error("【WQLCore】WDK基础表文件加载错误... WQLEngine.loadTables Failure");
return isLoadSuccess;
} else {
log.info("【WQLCore】WDK基础表文件加载成功... WQLEngine.loadTables Success");
@@ -492,14 +492,14 @@ public class WQLCore {
//预加载WQLObject
isLoadSuccess = WQLEngine.loadWQLObject(tbnames);
if (!isLoadSuccess) {
log.error("【WQLCore】错误编码加载错误... WQLEngine.loadErrorCode Failure");
//log.error("【WQLCore】错误编码加载错误... WQLEngine.loadErrorCode Failure");
return isLoadSuccess;
} else {
log.info("【WQLCore】编码加载成功... WQLEngine.loadErrorCode Success");
}
if (!isLoadSuccess) {
log.error("-----------------------WQL引擎启动 启动失败 --------------");
log.debug("-----------------------WQL引擎启动 启动失败 --------------");
} else {
log.debug("-----------------------WQL引擎启动 开发模式启动成功 --------------");
}

View File

@@ -44,7 +44,7 @@ public class WQLModule implements Serializable,Cloneable{
if(WQLCore.moduleMap.containsKey(modulecode)){
return WQLCore.moduleMap.get(modulecode);
}else{
log.error("【WQL】-【WQLModule】代码模型["+modulecode+"]不存在!");
//log.error("【WQL】-【WQLModule】代码模型["+modulecode+"]不存在!");
return null;
}
}
@@ -232,14 +232,14 @@ public class WQLModule implements Serializable,Cloneable{
//查询失败
ArrayList errList = resultBean.getInfoError();
for(int i=0;i<errList.size();i++){
log.error(errList.get(i).toString());
//log.error(errList.get(i).toString());
}
}
}else{
log.error("代码模型["+wm.getModulecode()+"]数据源["+wm.getDatasource()+"]不存在!");
//log.error("代码模型["+wm.getModulecode()+"]数据源["+wm.getDatasource()+"]不存在!");
}
}catch (Exception e) {
log.error(e.getMessage());
//log.error(e.getMessage());
e.printStackTrace();
}
return ls;
@@ -283,7 +283,7 @@ public class WQLModule implements Serializable,Cloneable{
}
}catch (Exception e) {
log.error("代码模型["+wm.getModulecode()+"]数据查询错误:"+e.getMessage());
//log.error("代码模型["+wm.getModulecode()+"]数据查询错误:"+e.getMessage());
e.printStackTrace();
}
@@ -381,7 +381,7 @@ public class WQLModule implements Serializable,Cloneable{
}
// log.debug("代码模型["+wm.getModulecode()+"]id("+wm.getValuefield()+")转name("+namefield+")"+id+"->"+result);
}catch (Exception e) {
log.error("代码模型["+wm.getModulecode()+"]id("+wm.getValuefield()+")转name("+namefield+")错误:"+e.getMessage());
//log.error("代码模型["+wm.getModulecode()+"]id("+wm.getValuefield()+")转name("+namefield+")错误:"+e.getMessage());
e.printStackTrace();
}
return result;
@@ -430,7 +430,7 @@ public class WQLModule implements Serializable,Cloneable{
}
}
}catch (Exception e) {
log.error(e.getMessage());
//log.error(e.getMessage());
e.printStackTrace();
}
return result;
@@ -479,11 +479,11 @@ public class WQLModule implements Serializable,Cloneable{
//查询失败
ArrayList errList = resultBean.getInfoError();
for(int i=0;i<errList.size();i++){
log.error(errList.get(i).toString());
//log.error(errList.get(i).toString());
}
}
}catch (Exception e) {
log.error(e.getMessage());
//log.error(e.getMessage());
e.printStackTrace();
}
return ls;
@@ -522,7 +522,7 @@ public class WQLModule implements Serializable,Cloneable{
}
}catch (Exception e) {
log.error("代码模型["+wm.getModulecode()+"]数据查询错误:"+e.getMessage());
//log.error("代码模型["+wm.getModulecode()+"]数据查询错误:"+e.getMessage());
e.printStackTrace();
}
@@ -579,7 +579,7 @@ public class WQLModule implements Serializable,Cloneable{
}
// log.debug("代码模型["+wm.getModulecode()+"]id("+wm.getValuefield()+")转name("+namefield+")"+id+"->"+result);
}catch (Exception e) {
log.error("代码模型["+wm.getModulecode()+"]id("+wm.getValuefield()+")转name("+namefield+")错误:"+e.getMessage());
//log.error("代码模型["+wm.getModulecode()+"]id("+wm.getValuefield()+")转name("+namefield+")错误:"+e.getMessage());
e.printStackTrace();
}
return result;
@@ -628,7 +628,7 @@ public class WQLModule implements Serializable,Cloneable{
}
}
}catch (Exception e) {
log.error(e.getMessage());
//log.error(e.getMessage());
e.printStackTrace();
}
return result;

View File

@@ -167,7 +167,7 @@ public class WQLObject implements Serializable, Cloneable {
}
}
} else {
log.error("数据表【" + tbname + "】字段【" + col.getEnname() + "】设置的解析代码【" + Module + "】不存在!");
//log.error("数据表【" + tbname + "】字段【" + col.getEnname() + "】设置的解析代码【" + Module + "】不存在!");
}
} else {
//代码模型后没有带字段名内容
@@ -190,7 +190,7 @@ public class WQLObject implements Serializable, Cloneable {
list.add(map);
} else {
log.error("数据表【" + tbname + "】字段【" + col.getEnname() + "】设置的解析代码【" + Module + "】不存在!");
//log.error("数据表【" + tbname + "】字段【" + col.getEnname() + "】设置的解析代码【" + Module + "】不存在!");
}
}
}
@@ -203,8 +203,8 @@ public class WQLObject implements Serializable, Cloneable {
if (whereArgNames == null) whereArgNames = new ArrayList<String>();
String transwhereClause = transWhereclauseSQL(whereClause, true, whereArgNames);
if (whereArgNames.size() > (whereArgs == null ? 0 : whereArgs.length)) {
log.error("查询条件参数值不足!");
log.error("查询条件:" + whereClause);
//log.error("查询条件参数值不足!");
//log.error("查询条件:" + whereClause);
throw new WDKException("查询条件参数值不足,查询条件:" + whereClause + ",条件值:" + (whereArgs == null ? "[]" : whereArgs.toString()));
}
//构造查询WQL
@@ -335,8 +335,8 @@ public class WQLObject implements Serializable, Cloneable {
if (whereArgNames == null) whereArgNames = new ArrayList<String>();
String transwhereClause = transWhereclauseSQL(whereClause, true, whereArgNames);
if (whereArgNames.size() > (whereArgs == null ? 0 : whereArgs.length)) {
log.error("查询条件参数值不足!");
log.error("查询条件:" + whereClause);
//log.error("查询条件参数值不足!");
//log.error("查询条件:" + whereClause);
throw new WDKException("查询条件参数值不足,查询条件:" + whereClause + ",条件值:" + (whereArgs == null ? "[]" : whereArgs.toString()));
}
//构造查询WQL
@@ -992,7 +992,7 @@ public class WQLObject implements Serializable, Cloneable {
throw new WDKException("create WQLObject exception, table " + tbname + " does not exist");
}
} catch (Exception e) {
log.error(e.getMessage());
//log.error(e.getMessage());
e.printStackTrace();
throw new WDKException("create WQLObject exception", e);
}
@@ -2021,7 +2021,7 @@ public class WQLObject implements Serializable, Cloneable {
return field.getEnname();
}
} else {
log.error("数据表【" + tbname + "】字段【" + fieldname + "】不存在!");
//log.error("数据表【" + tbname + "】字段【" + fieldname + "】不存在!");
return "";
}
}

View File

@@ -70,12 +70,12 @@ public class DBConnection {
currpooltype = DBPOOLTYPE_LOCAL;
conn = dbpool.getConnection(name);
} else {
log.error("DBConnection无法获得数据库连接资源.");
log.debug("DBConnection无法获得数据库连接资源.");
}
}
}
}
log.error("DBConnection无法获得数据库连接资源.");
//log.error("DBConnection无法获得数据库连接资源.");
}
try {
// if(null!=conn){

View File

@@ -84,7 +84,7 @@ public class DBPool {
conn = DriverManager.getConnection(dbb.getUrl(), dbb.getUser(),dbb.getPassword());
log.debug("LOCAL创建一个新的连接");
}catch(Exception e){
log.error("无法创建下列URL的连接:: " + dbb.getUrl() + ", 错误: " + e);
//log.error("无法创建下列URL的连接:: " + dbb.getUrl() + ", 错误: " + e);
}
return conn;
}
@@ -97,7 +97,7 @@ public class DBPool {
public static UserTransaction getTransaction(String name) {
UserTransaction ut = null;
log.error("不能获得Local事务管理:local方式不支持事务管理");
//log.error("不能获得Local事务管理:local方式不支持事务管理");
return ut;
}

View File

@@ -81,7 +81,7 @@ public class DBPoolSpring {
DataSource dataSource = (DataSource) SpringContextHolder.getBean(name);
conn = DataSourceUtils.getConnection(dataSource);
} catch (Exception e) {
log.error("不能获得Spring连接池中的数据库连接:" + e.toString());
//log.error("不能获得Spring连接池中的数据库连接:" + e.toString());
}
return conn;
}
@@ -104,7 +104,7 @@ public class DBPoolSpring {
//JtaTransactionManager txManager = (JtaTransactionManager)SpringContext.getBean("UdataSource");
//ut = txManager.getUserTransaction();
} catch (Exception e) {
log.error("不能获得Spring事务管理:Spring方式不支持事务管理");
//log.error("不能获得Spring事务管理:Spring方式不支持事务管理");
}
return ut;
}
@@ -140,7 +140,7 @@ public class DBPoolSpring {
try {
ctx.close();
} catch (NamingException e) {
log.error("Spring上下文关闭出错:" + e.toString());
//log.error("Spring上下文关闭出错:" + e.toString());
}
ctx = null;
}

View File

@@ -89,7 +89,7 @@ public class DBPoolTomcat {
javax.sql.DataSource ds = (javax.sql.DataSource) obj;
conn = ds.getConnection();
} catch (Exception e) {
log.error("不能获得Tomcat连接池中的数据库连接:"+e.toString() );
//log.error("不能获得Tomcat连接池中的数据库连接:"+e.toString() );
}
return conn;
}
@@ -110,7 +110,7 @@ public class DBPoolTomcat {
ut = (UserTransaction) obj;
//setUseful (true);
} catch (Exception e) {
log.error("不能获得Tomcat事务管理:"+e.toString() );
//log.error("不能获得Tomcat事务管理:"+e.toString() );
//System.out.print("DBPool:"+e.toString());
//e.printStackTrace();
}

View File

@@ -79,7 +79,7 @@ public class DBPoolWeblogic {
conn = ds.getConnection();
freeContext(ctx);
} catch (Exception e) {
log.error("不能获得Weblogic连接池中的数据库连接:"+e.toString() );
//log.error("不能获得Weblogic连接池中的数据库连接:"+e.toString() );
}
return conn;
}
@@ -105,7 +105,7 @@ public class DBPoolWeblogic {
//setUseful (true);
freeContext(ctx);
} catch (Exception e) {
log.error("不能获得Weblogic事务管理:"+e.toString() );
//log.error("不能获得Weblogic事务管理:"+e.toString() );
}
return ut;
}
@@ -121,7 +121,7 @@ public class DBPoolWeblogic {
conn.close();
}
} catch (SQLException e) {
log.error("数据库连接关闭:"+e.toString() );
//log.error("数据库连接关闭:"+e.toString() );
}
}
@@ -140,7 +140,7 @@ public class DBPoolWeblogic {
try {
ctx.close();
} catch (NamingException e) {
log.error("Weblogic上下文关闭出错:"+e.toString() );
//log.error("Weblogic上下文关闭出错:"+e.toString() );
}
ctx=null;
}

View File

@@ -76,7 +76,7 @@ public class DBPoolWebsphere {
conn = ds.getConnection();
freeContext(ctx);
} catch (Exception e) {
log.error("不能获得WebSphere连接池中的数据库连接:"+e.toString() );
//log.error("不能获得WebSphere连接池中的数据库连接:"+e.toString() );
}
return conn;
}
@@ -102,7 +102,7 @@ public class DBPoolWebsphere {
//setUseful (true);
freeContext(ctx);
} catch (Exception e) {
log.error("不能获得WebSphere事务管理:"+e.toString() );
//log.error("不能获得WebSphere事务管理:"+e.toString() );
}
return ut;
}
@@ -118,7 +118,7 @@ public class DBPoolWebsphere {
conn.close();
}
} catch (SQLException e) {
log.error("数据库连接关闭:"+e.toString() );
//log.error("数据库连接关闭:"+e.toString() );
}
}
@@ -136,7 +136,7 @@ public class DBPoolWebsphere {
try {
ctx.close();
} catch (NamingException e) {
log.error("WebSphere上下文关闭出错:"+e.toString() );
//log.error("WebSphere上下文关闭出错:"+e.toString() );
}
ctx=null;
}

View File

@@ -193,8 +193,8 @@ public class Syntax {
log.debug("cmdstack size:"+cmdstack.size());
log.debug("stack size:"+stack.size());
if(stack.size()>0){
log.error("wql代码中存在关键字未封闭请检查");
log.debug(stack.toString());
//log.error("wql代码中存在关键字未封闭请检查");
//log.debug(stack.toString());
return false;
}else{
return true;

View File

@@ -519,10 +519,10 @@ public class WQLFun {
return Double.toString(A);
}catch(Exception e){
log.error(String.valueOf(e));
//log.error(String.valueOf(e));
StackTraceElement[] ste = e.getStackTrace();
for(int i=0; i<ste.length; i++){
log.error(" "+ste[i]);
//log.error(" "+ste[i]);
}
return "";
}
@@ -865,8 +865,8 @@ public class WQLFun {
}
}
} catch (Exception ex) {
log.error("算数表达式[" + expression + " ]不合法!");
log.error(ex.toString());
//log.error("算数表达式[" + expression + " ]不合法!");
//log.error(ex.toString());
}
//保留小数点后15位,written by wengbin
int i = sContent.indexOf(".");
@@ -1953,10 +1953,10 @@ public class WQLFun {
}
}
}catch(Exception e){
log.error(String.valueOf(e));
//log.error(String.valueOf(e));
StackTraceElement[] ste = e.getStackTrace();
for(int i=0; i<ste.length; i++){
log.error(ste[i].toString());
//log.error(ste[i].toString());
}
}

View File

@@ -272,7 +272,7 @@ public class WO implements Serializable, Cloneable{
}
catch(Exception e) {
e.printStackTrace();
log.error("WQL加载失败" + e.toString());
log.debug("WQL加载失败" + e.toString());
throw new Exception("请检查WQL文件【" + code + ".wql】的语法规范!", e);
}
}
@@ -435,7 +435,7 @@ public class WO implements Serializable, Cloneable{
String tempTableName = (String) it.next();
ArrayList rows = (ArrayList) WQLCore.tempTableMap.get(tempTableName.toUpperCase());
if(rows == null) {
log.error("临时表[" + tempTableName.toUpperCase() + "]未找到数据字典定义");
//log.error("临时表[" + tempTableName.toUpperCase() + "]未找到数据字典定义");
}
if(DataType.MYSQL.equals(dbtype)) { //mysql处理方式
String pkstr = new String();
@@ -572,7 +572,7 @@ public class WO implements Serializable, Cloneable{
}
}
catch(SQLException e) {
log.error("关闭st,rs出错" + e.toString());
//log.error("关闭st,rs出错" + e.toString());
}
}
}

View File

@@ -57,7 +57,7 @@ public class wqlAssign extends IWQL {
}
if (iscal && isunionstr) {
log.error("--------wql语法错误运算符和UNIONSTR不能连用\n" + cmdLine);
//log.error("--------wql语法错误运算符和UNIONSTR不能连用\n" + cmdLine);
return false;
}

View File

@@ -42,7 +42,7 @@ public class wqlCALLJAVA extends IWQL {
e.printStackTrace();
}
if(!isSuccess){
log.error("wqlCALLJAVA文件不存在"+javaname);
//log.error("wqlCALLJAVA文件不存在"+javaname);
return false;
}

View File

@@ -132,7 +132,7 @@ public class wqlCALLPROC extends IWQL {
}
catch (Exception ex) {
ex.printStackTrace();
log.error("存储过程执行出错:\n " + WQLFun.ScriptSwitch(wo.wp.sSQL ,wo.getDbtype()) + " \n" + ex.toString());
//log.error("存储过程执行出错:\n " + WQLFun.ScriptSwitch(wo.wp.sSQL ,wo.getDbtype()) + " \n" + ex.toString());
wo.wp.InfoError = new ErrorBean();
wo.wp.InfoError.setCode("E0023");
wo.wp.InfoError.setDescription("存储过程执行出错:\n " + wo.wp.sSQL + " \n" + ex.toString());
@@ -149,7 +149,7 @@ public class wqlCALLPROC extends IWQL {
// wo.wp.conn = null;
} catch (SQLException e) {
e.printStackTrace();
log.error("存储过程执行出错:\n " + WQLFun.ScriptSwitch(wo.wp.sSQL ,wo.getDbtype()) + " \n" + e.toString());
//log.error("存储过程执行出错:\n " + WQLFun.ScriptSwitch(wo.wp.sSQL ,wo.getDbtype()) + " \n" + e.toString());
wo.wp.InfoError = new ErrorBean();
wo.wp.InfoError.setCode("E0023");
wo.wp.InfoError.setDescription("存储过程执行出错:\n " + wo.wp.sSQL + " \n" + e.toString());

View File

@@ -26,7 +26,7 @@ public class wqlCALLWQL extends IWQL {
String wqlname = arr[1];
WO wocall = WQL.getWO(wqlname);
if(null==wocall){
log.error("CALLWQLwql文件不存在"+wqlname);
//log.error("CALLWQLwql文件不存在"+wqlname);
this.wo.wp._state = false;
return false;
}

View File

@@ -159,10 +159,10 @@ public class wqlDELETE extends IWQL {
} catch (Exception ex) {
ex.printStackTrace();
log.error("数据库DELETE出错:\n" + wo.wp.sSQL + "\n" + ex.toString());
//log.error("数据库DELETE出错:\n" + wo.wp.sSQL + "\n" + ex.toString());
for(int i=0;i<paraList.size();i++){
ParameterBean paraBean = paraList.get(i);
log.error("["+i+"][" + paraBean.getValue()+"]");
//log.error("["+i+"][" + paraBean.getValue()+"]");
}
wo.wp.InfoError = new ErrorBean();
wo.wp.InfoError.setCode("E0021");
@@ -175,7 +175,7 @@ public class wqlDELETE extends IWQL {
wo.wp.st = null ;
// wo.wp._state = true;
} catch (SQLException e) {
log.error("关闭st,rs出错" + e.toString() );
//log.error("关闭st,rs出错" + e.toString() );
wo.wp._state = false;
}
}

View File

@@ -37,8 +37,8 @@ public class wqlDUMP extends IWQL {
}
log.error("信息编码:" + code);
log.error("信息描述:" + desc);
//log.error("信息编码:" + code);
//log.error("信息描述:" + desc);
wo.wp.InfoDump = new ErrorBean();
wo.wp.InfoDump.setCode(code);
wo.wp.InfoDump.setDescription(desc);

View File

@@ -38,8 +38,8 @@ public class wqlERROR extends IWQL {
desc += ERROR.getDesc(str);
}
}
log.error("错误编码:"+code);
log.error("错误描述:"+desc);
//log.error("错误编码:"+code);
//log.error("错误描述:"+desc);
wo.wp.InfoError = new ErrorBean();
wo.wp.InfoError.setCode(code);
wo.wp.InfoError.setDescription(desc);

View File

@@ -128,10 +128,10 @@ public class wqlEXECSQL extends IWQL {
} catch (Exception ex) {
ex.printStackTrace();
log.error("数据库EXECSQL出错:\n" + wo.wp.sSQL + "\n" + ex.toString());
//log.error("数据库EXECSQL出错:\n" + wo.wp.sSQL + "\n" + ex.toString());
for(int i=0;i<paraList.size();i++){
ParameterBean paraBean = paraList.get(i);
log.error("["+i+"][" + paraBean.getValue()+"]");
//log.error("["+i+"][" + paraBean.getValue()+"]");
}
wo.wp.InfoError = new ErrorBean();
wo.wp.InfoError.setCode("E0021");
@@ -144,7 +144,7 @@ public class wqlEXECSQL extends IWQL {
wo.wp.st = null ;
// wo.wp._state = true;
} catch (SQLException e) {
log.error("关闭st,rs出错" + e.toString() );
//log.error("关闭st,rs出错" + e.toString() );
wo.wp._state = false;
}
}

View File

@@ -168,10 +168,10 @@ public class wqlINSERT extends IWQL {
} catch (Exception ex) {
ex.printStackTrace();
log.error("数据库INSERT出错:\n" + wo.wp.sSQL + "\n" + ex.toString());
//log.error("数据库INSERT出错:\n" + wo.wp.sSQL + "\n" + ex.toString());
for(int i=0;i<paraList.size();i++){
ParameterBean paraBean = paraList.get(i);
log.error("["+i+"][" + paraBean.getValue()+"]");
//log.error("["+i+"][" + paraBean.getValue()+"]");
}
wo.wp.InfoError = new ErrorBean();
wo.wp.InfoError.setCode("E0019");
@@ -184,7 +184,7 @@ public class wqlINSERT extends IWQL {
wo.wp.st = null ;
// wo.wp._state = true;
} catch (SQLException e) {
log.error("关闭st,rs出错" + e.toString() );
//log.error("关闭st,rs出错" + e.toString() );
wo.wp._state = false;
}
}

View File

@@ -33,7 +33,7 @@ public class wqlLOOP extends IWQL {
String[] arr = this.cmdLine.split(" ");
if(arr.length==1){
log.error("LOOP语法错误"+this.cmdLine);
//log.error("LOOP语法错误"+this.cmdLine);
return false;
}
@@ -44,7 +44,7 @@ public class wqlLOOP extends IWQL {
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
log.error("LOOP语法错误循环参数格式不正确"+this.cmdLine);
//log.error("LOOP语法错误循环参数格式不正确"+this.cmdLine);
return false;
}
boolean isSuccess = false;

View File

@@ -193,7 +193,7 @@ public class wqlSELECT extends IWQL {
if (wo.wp.st != null) wo.wp.st.close();
if (wo.wp.rs != null) wo.wp.rs.close();
} catch (SQLException e) {
log.error("关闭st,rs出错" + e.toString());
//log.error("关闭st,rs出错" + e.toString());
}
}
if (wo.wp.SORT_ORDERBYFIELD.length() > 0) {
@@ -240,7 +240,7 @@ public class wqlSELECT extends IWQL {
if (wo.wp.st != null) wo.wp.st.close();
if (wo.wp.rs != null) wo.wp.rs.close();
} catch (SQLException e) {
log.error("关闭st,rs出错" + e.toString());
//log.error("关闭st,rs出错" + e.toString());
}
wo.wp.sSQL = "select count(1) PAGE_TOTALRECORDNUM from ( " + wo.wp.sSQL + ") TOTALRECORDVIEW";
}
@@ -294,7 +294,7 @@ public class wqlSELECT extends IWQL {
if (wo.wp.st != null) wo.wp.st.close();
if (wo.wp.rs != null) wo.wp.rs.close();
} catch (SQLException e) {
log.error("关闭st,rs出错" + e.toString());
//log.error("关闭st,rs出错" + e.toString());
}
}
if (wo.wp.SORT_ORDERBYFIELD.length() > 0) {
@@ -349,7 +349,7 @@ public class wqlSELECT extends IWQL {
if (wo.wp.st != null) wo.wp.st.close();
if (wo.wp.rs != null) wo.wp.rs.close();
} catch (SQLException e) {
log.error("关闭st,rs出错" + e.toString());
//log.error("关闭st,rs出错" + e.toString());
}
}
if (wo.wp.SORT_ORDERBYFIELD.length() > 0) {
@@ -403,7 +403,7 @@ public class wqlSELECT extends IWQL {
if (wo.wp.st != null) wo.wp.st.close();
if (wo.wp.rs != null) wo.wp.rs.close();
} catch (SQLException e) {
log.error("关闭st,rs出错" + e.toString());
//log.error("关闭st,rs出错" + e.toString());
}
}
if (wo.wp.SORT_ORDERBYFIELD.length() > 0) {
@@ -453,10 +453,10 @@ public class wqlSELECT extends IWQL {
wo.wp._state = true;
} catch (Exception ex) {
ex.printStackTrace();
log.error("数据库SELECT出错:\n " + WQLFun.ScriptSwitch(wo.wp.sSQL, wo.getDbtype()) + " \n" + ex.toString());
//log.error("数据库SELECT出错:\n " + WQLFun.ScriptSwitch(wo.wp.sSQL, wo.getDbtype()) + " \n" + ex.toString());
for (int i = 0; i < paraList.size(); i++) {
ParameterBean paraBean = paraList.get(i);
log.error("[" + i + "][" + paraBean.getValue() + "]");
//log.error("[" + i + "][" + paraBean.getValue() + "]");
}
wo.wp.InfoError = new ErrorBean();
wo.wp.InfoError.setCode("E0018");
@@ -471,7 +471,7 @@ public class wqlSELECT extends IWQL {
wo.wp.rs = null;
// wo.wp._state = true;
} catch (SQLException e) {
log.error("关闭st,rs出错" + e.toString());
//log.error("关闭st,rs出错" + e.toString());
wo.wp._state = false;
}
}

View File

@@ -179,10 +179,10 @@ public class wqlUPDATE extends IWQL {
} catch (Exception ex) {
ex.printStackTrace();
log.error("数据库UPDATE出错:\n" + wo.wp.sSQL + "\n" + ex.toString());
//log.error("数据库UPDATE出错:\n" + wo.wp.sSQL + "\n" + ex.toString());
for(int i=0;i<paraList.size();i++){
ParameterBean paraBean = paraList.get(i);
log.error("["+i+"][" + paraBean.getValue()+"]");
//log.error("["+i+"][" + paraBean.getValue()+"]");
}
wo.wp.InfoError = new ErrorBean();
wo.wp.InfoError.setCode("E0020");
@@ -197,7 +197,7 @@ public class wqlUPDATE extends IWQL {
// wo.wp._state = true;
}
} catch (SQLException e) {
log.error("关闭st,rs出错" + e.toString() );
//log.error("关闭st,rs出错" + e.toString() );
wo.wp._state = false;
}
}

View File

@@ -133,7 +133,7 @@ public class Calculate {
}
void errReport() {
log.error("算数表达式不合法!");
//log.error("算数表达式不合法!");
}
int stack_compare(String s2) {

View File

@@ -93,7 +93,7 @@ public class WqlUtil{
}
}
catch(Exception arg15) {
log.error("getSQLFieldValue error, class=com.ibm.db2.jcc :" + arg15.getMessage());
//log.error("getSQLFieldValue error, class=com.ibm.db2.jcc :" + arg15.getMessage());
arg15.printStackTrace();
}
}
@@ -114,7 +114,7 @@ public class WqlUtil{
}
}
catch(Exception arg9) {
log.error("getSQLFieldValue error, class=weblogic.jdbc.wrapper.Clob_com.ibm.db2.jcc.* :" + arg9.getMessage());
//log.error("getSQLFieldValue error, class=weblogic.jdbc.wrapper.Clob_com.ibm.db2.jcc.* :" + arg9.getMessage());
arg9.printStackTrace();
}
}

View File

@@ -90,7 +90,7 @@ public class ExecutionJob extends QuartzJobBean {
quartzJobService.updateIsPause(quartzJob);
}
//异常时候打印日志
log.error(logDto.toString());
//log.error(logDto.toString());
quartzLogMapper.insert(logDto);
} finally {

View File

@@ -50,7 +50,7 @@ public class QuartzManage {
pauseJob(quartzJob);
}
} catch (Exception e){
log.error("创建定时任务失败", e);
//log.error("创建定时任务失败", e);
throw new BadRequestException("创建定时任务失败");
}
}
@@ -80,7 +80,7 @@ public class QuartzManage {
pauseJob(quartzJob);
}
} catch (Exception e){
log.error("更新定时任务失败", e);
//log.error("更新定时任务失败", e);
throw new BadRequestException("更新定时任务失败");
}
}
@@ -100,7 +100,7 @@ public class QuartzManage {
JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getJobId());
scheduler.resumeJob(jobKey);
} catch (Exception e){
log.error("恢复定时任务失败", e);
//log.error("恢复定时任务失败", e);
throw new BadRequestException("恢复定时任务失败");
}
}
@@ -114,7 +114,7 @@ public class QuartzManage {
JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getJobId());
scheduler.pauseJob(jobKey);
} catch (Exception e){
log.error("定时任务暂停失败", e);
//log.error("定时任务暂停失败", e);
throw new BadRequestException("定时任务暂停失败");
}
}
@@ -136,7 +136,7 @@ public class QuartzManage {
JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getJobId());
scheduler.triggerJob(jobKey,dataMap);
} catch (Exception e){
log.error("定时任务执行失败", e);
//log.error("定时任务执行失败", e);
throw new BadRequestException("定时任务执行失败");
}
}
@@ -151,7 +151,7 @@ public class QuartzManage {
scheduler.pauseJob(jobKey);
scheduler.deleteJob(jobKey);
} catch (Exception e){
log.error("删除定时任务失败", e);
//log.error("删除定时任务失败", e);
throw new BadRequestException("删除定时任务失败");
}
}

View File

@@ -98,7 +98,7 @@ public class OnlineUserService{
// onlineUserDto = new OnlineUserDto(userDto.getUsername(), userDto.getNickName(), dept, browser , ip, address, EncryptUtils.desEncrypt(token), new Date());
}
catch(Exception e) {
log.error(e.getMessage(), e);
//log.error(e.getMessage(), e);
}
redisUtils.set(token, onlineUserDto, StpUtil.getTokenTimeout());
}
@@ -215,7 +215,7 @@ public class OnlineUserService{
}
}
catch(Exception e) {
log.error("checkUser is error", e);
//log.error("checkUser is error", e);
}
}
}

View File

@@ -101,7 +101,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
// MultipartFile to File
multipartFile.transferTo(file);
} catch (IOException e) {
log.error(e.getMessage(), e);
//log.error(e.getMessage(), e);
}
return file;
}
@@ -196,7 +196,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
file.transferTo(dest);
return dest;
} catch (Exception e) {
log.error(e.getMessage(), e);
//log.error(e.getMessage(), e);
}
return null;
}
@@ -277,10 +277,10 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
try {
System.out.println(in.read(b));
} catch (IOException e) {
log.error(e.getMessage(), e);
//log.error(e.getMessage(), e);
}
} catch (FileNotFoundException e) {
log.error(e.getMessage(), e);
//log.error(e.getMessage(), e);
return null;
}
return b;
@@ -303,7 +303,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
}
return new String(str);
} catch (Exception e) {
log.error(e.getMessage(), e);
//log.error(e.getMessage(), e);
}
return null;
}
@@ -325,7 +325,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
IOUtils.copy(fis, response.getOutputStream());
response.flushBuffer();
} catch (Exception e) {
log.error(e.getMessage(), e);
//log.error(e.getMessage(), e);
} finally {
if (fis != null) {
try {
@@ -334,7 +334,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
file.deleteOnExit();
}
} catch (IOException e) {
log.error(e.getMessage(), e);
//log.error(e.getMessage(), e);
}
}
}

View File

@@ -172,7 +172,7 @@ public class StringUtils {
try {
ip = InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException e) {
log.error(e.getMessage(), e);
//log.error(e.getMessage(), e);
}
}
return ip;

View File

@@ -31,11 +31,11 @@ https://juejin.cn/post/6844903775631572999
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<maxHistory>8</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>200MB</maxFileSize>
<!--所有日志最多占多大容量-->
<totalSizeCap>20GB</totalSizeCap>
<totalSizeCap>4G</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期%thread表示线程名%-5level级别从左显示5个字符宽度%msg日志消息%n是换行符-->