底层系统日志级别调整,高频非核心日志调整为debug级别

pull/4/head
xuxueli 7 years ago
parent eb4c3c2b18
commit 45bac140b7

@ -1025,6 +1025,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
- 4、修复任务监控线程无法监控任务触发和执行状态均未0的问题
- 5、调度中心项目日志配置改为xml文件格式
- 6、执行器动态代理对象拦截非业务方法的执行
- 7、底层系统日志级别规范调整清理遗留代码
### TODO LIST
- 1、任务权限管理执行器为粒度分配权限核心操作校验权限

@ -1,94 +0,0 @@
package com.xxl.job.admin.core.jobbean;
//package com.xxl.job.action.job;
//
//import java.io.PrintWriter;
//import java.io.StringWriter;
//import java.util.Date;
//import java.util.HashMap;
//import java.util.Map;
//
//import org.apache.commons.lang.StringUtils;
//import org.quartz.JobExecutionContext;
//import org.quartz.JobExecutionException;
//import org.quartz.JobKey;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.scheduling.quartz.QuartzJobBean;
//
//import com.xxl.job.client.handler.HandlerRouter;
//import com.xxl.job.client.util.XxlJobNetCommUtil.RemoteCallBack;
//import com.xxl.job.client.util.JacksonUtil;
//import com.xxl.job.core.model.XxlJobInfo;
//import com.xxl.job.core.model.XxlJobLog;
//import com.xxl.job.core.thread.JobFailMonitorHelper;
//import com.xxl.job.core.util.DynamicSchedulerUtil;
//
///**
// * http job bean
// * @author xuxueli 2015-12-17 18:20:34
// */
//@Deprecated
//public abstract class LocalNomalJobBean extends QuartzJobBean {
// private static Logger logger = LoggerFactory.getLogger(LocalNomalJobBean.class);
//
// @Override
// protected void executeInternal(JobExecutionContext context)
// throws JobExecutionException {
// JobKey jobKey = context.getTrigger().getJobKey();
//
// XxlJobInfo jobInfo = DynamicSchedulerUtil.xxlJobInfoDao.load(jobKey.getGroup(), jobKey.getName());
// @SuppressWarnings("unchecked")
// HashMap<String, String> jobDataMap = (HashMap<String, String>) JacksonUtil.readValueRefer(jobInfo.getJobData(), Map.class);
//
// // save log
// XxlJobLog jobLog = new XxlJobLog();
// jobLog.setJobGroup(jobInfo.getJobGroup());
// jobLog.setJobName(jobInfo.getJobName());
// jobLog.setJobCron(jobInfo.getJobCron());
// jobLog.setJobDesc(jobInfo.getJobDesc());
// jobLog.setJobClass(jobInfo.getJobClass());
// jobLog.setJobData(jobInfo.getJobData());
//
// jobLog.setJobClass(RemoteHttpJobBean.class.getName());
// jobLog.setJobData(jobInfo.getJobData());
// DynamicSchedulerUtil.xxlJobLogDao.save(jobLog);
// logger.info(">>>>>>>>>>> xxl-job trigger start, jobLog:{}", jobLog);
//
// // trigger request
// String handler_params = jobDataMap.get(HandlerRouter.HANDLER_PARAMS);
// String[] handlerParams = null;
// if (StringUtils.isNotBlank(handler_params)) {
// handlerParams = handler_params.split(",");
// }
//
// jobLog.setTriggerTime(new Date());
// jobLog.setTriggerStatus(RemoteCallBack.SUCCESS);
// jobLog.setTriggerMsg(null);
//
// try {
// Object responseMsg = this.handle(handlerParams);
//
// jobLog.setHandleTime(new Date());
// jobLog.setHandleStatus(RemoteCallBack.SUCCESS);
// jobLog.setHandleMsg(JacksonUtil.writeValueAsString(responseMsg));
// } catch (Exception e) {
// logger.info("JobThread Exception:", e);
// StringWriter out = new StringWriter();
// e.printStackTrace(new PrintWriter(out));
//
// jobLog.setHandleTime(new Date());
// jobLog.setHandleStatus(RemoteCallBack.FAIL);
// jobLog.setHandleMsg(out.toString());
// }
//
// // update trigger info
// DynamicSchedulerUtil.xxlJobLogDao.updateTriggerInfo(jobLog);
// DynamicSchedulerUtil.xxlJobLogDao.updateHandleInfo(jobLog);
// JobFailMonitorHelper.monitor(jobLog.getId());
// logger.info(">>>>>>>>>>> xxl-job trigger end, jobLog.id:{}, jobLog:{}", jobLog.getId(), jobLog);
//
// }
//
// public abstract Object handle(String... param);
//
//}

@ -1,30 +0,0 @@
package com.xxl.job.admin.core.jobbean.impl;
//package com.xxl.job.action.job.impl;
//
//import java.util.concurrent.TimeUnit;
//
//import org.quartz.DisallowConcurrentExecution;
//
//import com.xxl.job.action.job.LocalNomalJobBean;
//
///**
// * demo job bean for no-concurrent
// * @author xuxueli 2016-3-12 14:25:14
// */
//@Deprecated
//@DisallowConcurrentExecution // 串行;线程数要多配置几个,否则不生效;
//public class DemoConcurrentJobBean extends LocalNomalJobBean {
//
// @Override
// public Object handle(String... param) {
//
// try {
// TimeUnit.SECONDS.sleep(10);
// } catch (InterruptedException e) {
// logger.error(e.getMessage(), e);
// }
//
// return false;
// }
//
//}

@ -1,32 +0,0 @@
package com.xxl.job.admin.core.jobbean.impl;
//package com.xxl.job.action.job.impl;
//
//import java.util.concurrent.TimeUnit;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//
//import com.xxl.job.action.job.LocalNomalJobBean;
//
///**
// * demo job bean for concurrent
// * @author xuxueli 2016-3-12 14:25:57
// */
//@Deprecated
//public class DemoNomalJobBean extends LocalNomalJobBean {
// private static Logger Logger = LoggerFactory.getLogger(DemoNomalJobBean.class);
//
// @Override
// public Object handle(String... param) {
// Logger.info("DemoNomalJobBean run :" + param);
//
// try {
// TimeUnit.SECONDS.sleep(10);
// } catch (InterruptedException e) {
// logger.error(e.getMessage(), e);
// }
//
// return false;
// }
//
//}

@ -63,7 +63,7 @@ public class JobFailMonitorHelper {
logger.info(">>>>>>>>>>> job monitor, job fail, JobLogId:{}", jobLogId);
} else {
JobFailMonitorHelper.monitor(jobLogId);
logger.info(">>>>>>>>>>> job monitor, job unknown, JobLogId:{}", jobLogId);
logger.info(">>>>>>>>>>> job monitor, job status unknown, JobLogId:{}", jobLogId);
}
}
}

@ -35,7 +35,7 @@ public class XxlJobTrigger {
// load data
XxlJobInfo jobInfo = XxlJobDynamicScheduler.xxlJobInfoDao.loadById(jobId); // job info
if (jobInfo == null) {
logger.warn(">>>>>>>>>>>> xxl-job trigger fail, jobId invalidjobId={}", jobId);
logger.warn(">>>>>>>>>>>> trigger fail, jobId invalidjobId={}", jobId);
return;
}
XxlJobGroup group = XxlJobDynamicScheduler.xxlJobGroupDao.load(jobInfo.getJobGroup()); // group info

@ -93,7 +93,7 @@ public class MailUtil {
javaMailSender.send(mimeMessage);
return true;
} catch (Exception e) {
logger.info("{}", e);
logger.error(e.getMessage(), e);
}
return false;
}

@ -45,7 +45,7 @@ public class AdminBizImpl implements AdminBiz {
public ReturnT<String> callback(List<HandleCallbackParam> callbackParamList) {
for (HandleCallbackParam handleCallbackParam: callbackParamList) {
ReturnT<String> callbackResult = callback(handleCallbackParam);
logger.info("JobApiController.callback {}, handleCallbackParam={}, callbackResult={}",
logger.info(">>>>>>>>> JobApiController.callback {}, handleCallbackParam={}, callbackResult={}",
(callbackResult.getCode()==ReturnT.SUCCESS_CODE?"success":"fail"), handleCallbackParam, callbackResult);
}

@ -43,7 +43,7 @@ public class XxlJobLogger {
// appendlog
XxlJobFileAppender.appendLog(logFileName, formatAppendLog);
logger.warn("[{}]: {}", logFileName, formatAppendLog);
logger.debug(">>>>>>>>>>> [{}]: {}", logFileName, formatAppendLog);
}
/**

@ -44,7 +44,7 @@ public class JettyServer {
try {
// Start server
server.start();
logger.info(">>>>>>>>>>>> xxl-job jetty server start success at port:{}.", port);
logger.info(">>>>>>>>>>> xxl-job jetty server start success at port:{}.", port);
// Start Registry-Server
ExecutorRegistryThread.getInstance().start(port, ip, appName);

@ -28,11 +28,11 @@ public class ExecutorRegistryThread extends Thread {
// valid
if (appName==null || appName.trim().length()==0) {
logger.warn(">>>>>>>>>>>> xxl-job, executor registry config fail, appName is null.");
logger.warn(">>>>>>>>>>> xxl-job, executor registry config fail, appName is null.");
return;
}
if (XxlJobExecutor.getAdminBizList() == null) {
logger.warn(">>>>>>>>>>>> xxl-job, executor registry config fail, adminAddresses is null.");
logger.warn(">>>>>>>>>>> xxl-job, executor registry config fail, adminAddresses is null.");
return;
}
@ -99,7 +99,7 @@ public class ExecutorRegistryThread extends Thread {
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
logger.warn(">>>>>>>>>>>> xxl-job, executor registry thread destory.");
logger.info(">>>>>>>>>>> xxl-job, executor registry thread destory.");
}
});

@ -57,7 +57,7 @@ public class JobThread extends Thread{
public ReturnT<String> pushTriggerQueue(TriggerParam triggerParam) {
// avoid repeat
if (triggerLogIdSet.contains(triggerParam.getLogId())) {
logger.debug("repeate trigger job, logId:{}", triggerParam.getLogId());
logger.info(">>>>>>>>>>> repeate trigger job, logId:{}", triggerParam.getLogId());
return new ReturnT<String>(ReturnT.FAIL_CODE, "repeate trigger job, logId:" + triggerParam.getLogId());
}
@ -171,6 +171,6 @@ public class JobThread extends Thread{
}
}
logger.info(">>>>>>>>>>>> xxl-job JobThread stoped, hashCode:{}", Thread.currentThread());
logger.info(">>>>>>>>>>> xxl-job JobThread stoped, hashCode:{}", Thread.currentThread());
}
}

@ -40,7 +40,7 @@ public class TriggerCallbackThread {
// valid
if (XxlJobExecutor.getAdminBizList() == null) {
logger.warn(">>>>>>>>>>>> xxl-job, executor callback config fail, adminAddresses is null.");
logger.warn(">>>>>>>>>>> xxl-job, executor callback config fail, adminAddresses is null.");
return;
}
@ -80,7 +80,7 @@ public class TriggerCallbackThread {
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
logger.warn(">>>>>>>>>>>> xxl-job, executor callback thread destory.");
logger.info(">>>>>>>>>>> xxl-job, executor callback thread destory.");
}
});

@ -64,7 +64,7 @@ public class HttpClientUtil {
EntityUtils.consume(entity);
}
} catch (Exception e) {
logger.error("", e);
logger.error(e.getMessage(), e);
throw e;
} finally {
httpPost.releaseConnection();

Loading…
Cancel
Save