底层日志底层日志调整,非敏感日志level调整为debug;

v1.5
xueli.xue 8 years ago
parent 6b91f40889
commit 859207d05e

@ -708,6 +708,8 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
- 1、IP工具类获取IP逻辑优化IP静态缓存
- 2、执行器、调度中心均支持自定义注册IP地址解决机器多网卡时错误网卡注册的情况
- 3、任务跨天执行时生成多份日志文件的问题修复
- 4、底层日志底层日志调整非敏感日志level调整为debug
- 5、执行器AppName必须在调度中心配置才允许注册一个AppName可以配置多个执行器将会同时注册到对应执行器上
#### 规划中

@ -45,7 +45,6 @@ public class JobLogController {
public String index(Model model, String jobGroup, String jobName) {
// 任务组
List<XxlJobGroup> jobGroupList = xxlJobGroupDao.findAll();
model.addAttribute("jobGroup", jobGroup);
@ -92,24 +91,6 @@ public class JobLogController {
return maps;
}
/*@RequestMapping("/save")
@ResponseBody
@PermessionLimit(limit=false)
public RemoteCallBack triggerLog(int trigger_log_id, String status, String msg) {
RemoteCallBack callBack = new RemoteCallBack();
callBack.setStatus(RemoteCallBack.FAIL);
XxlJobLog log = xxlJobLogDao.load(trigger_log_id);
if (log!=null) {
log.setHandleTime(new Date());
log.setHandleStatus(status);
log.setHandleMsg(msg);
xxlJobLogDao.updateHandleInfo(log);
callBack.setStatus(RemoteCallBack.SUCCESS);
return callBack;
}
return callBack;
}*/
@RequestMapping("/logDetail")
@ResponseBody
public ReturnT<String> logDetail(int id){

@ -22,7 +22,7 @@ public class WebExceptionResolver implements HandlerExceptionResolver {
@Override
public ModelAndView resolveException(HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex) {
logger.error("system catch exception:{}", ex);
logger.error("WebExceptionResolver:{}", ex);
ModelAndView mv = new ModelAndView();
HandlerMethod method = (HandlerMethod)handler;

@ -15,7 +15,7 @@ import org.slf4j.LoggerFactory;
public class XxlJobLogCallbackServer {
private static final Logger logger = LoggerFactory.getLogger(XxlJobLogCallbackServer.class);
Server server = null;
private Server server = null;
public void start(int callBackPort) throws Exception {
final int port = Integer.valueOf(callBackPort);

@ -42,7 +42,7 @@ public class RemoteHttpJobBean extends QuartzJobBean {
jobLog.setJobGroup(jobInfo.getJobGroup());
jobLog.setJobName(jobInfo.getJobName());
DynamicSchedulerUtil.xxlJobLogDao.save(jobLog);
logger.info(">>>>>>>>>>> xxl-job trigger start, jobId:{}", jobLog.getId());
logger.debug(">>>>>>>>>>> xxl-job trigger start, jobId:{}", jobLog.getId());
// admin address
List<String> adminAddressList = JobRegistryHelper.discover(RegistHelper.RegistType.ADMIN.name(), RegistHelper.RegistType.ADMIN.name());
@ -89,7 +89,7 @@ public class RemoteHttpJobBean extends QuartzJobBean {
// monitor triger
JobMonitorHelper.monitor(jobLog.getId());
logger.info(">>>>>>>>>>> xxl-job trigger end, jobId:{}", jobLog.getId());
logger.debug(">>>>>>>>>>> xxl-job trigger end, jobId:{}", jobLog.getId());
}

@ -35,7 +35,7 @@ public class JobMonitorHelper {
public void run() {
while (true) {
try {
logger.info(">>>>>>>>>>> job monitor beat ... ");
logger.debug(">>>>>>>>>>> job monitor beat ... ");
Integer jobLogId = JobMonitorHelper.helper.queue.take();
if (jobLogId != null && jobLogId > 0) {
logger.info(">>>>>>>>>>> job monitor heat success, JobLogId:{}", jobLogId);

@ -21,7 +21,7 @@ public class DbRegistHelper implements RegistHelper {
String insertSql = "INSERT INTO XXL_JOB_QRTZ_TRIGGER_REGISTRY( `registry_group` , `registry_key` , `registry_value`, `update_time`) VALUES(? , ? , ?, NOW())";
int ret = DBUtil.update(dataSource, updateSql, new Object[]{registGroup, registryKey, registryValue});
if (ret<1) {
ret = DBUtil.update(dataSource, insertSql, new Object[]{registGroup, registryKey, registryValue});
//ret = DBUtil.update(dataSource, insertSql, new Object[]{registGroup, registryKey, registryValue});
}
return ret;
}

@ -40,7 +40,7 @@ public class JobThread extends Thread{
public void pushTriggerQueue(RequestModel requestModel) {
if (triggerLogIdSet.contains(requestModel.getLogId())) {
logger.info("repeate trigger job, logId:{}", requestModel.getLogId());
logger.debug("repeate trigger job, logId:{}", requestModel.getLogId());
return;
}
@ -58,8 +58,6 @@ public class JobThread extends Thread{
this.stopReason = stopReason;
}
int i = 1;
@Override
public void run() {
@ -83,16 +81,16 @@ public class JobThread extends Thread{
String logFileName = XxlJobFileAppender.makeLogFileName(new Date(triggerDate.getLogDateTim()), triggerDate.getLogId());
XxlJobFileAppender.contextHolder.set(logFileName);
logger.info("----------- xxl-job job handle start -----------");
logger.info("----------- xxl-job job execute start -----------");
handler.execute(handlerParams);
} catch (Exception e) {
logger.info("JobThread Exception:", e);
logger.error("JobThread Exception:", e);
_status = ResponseModel.FAIL;
StringWriter out = new StringWriter();
e.printStackTrace(new PrintWriter(out));
_msg = out.toString();
}
logger.info("----------- xxl-job job handle end ----------- <br> Look : ExecutorParams:{}, Status:{}, Msg:{}",
logger.info("----------- xxl-job job execute end ----------- <br> Look : ExecutorParams:{}, Status:{}, Msg:{}",
new Object[]{handlerParams, _status, _msg});
// callback handler info
@ -109,7 +107,7 @@ public class JobThread extends Thread{
}
}
} catch (Exception e) {
logger.info("JobThread Exception:", e);
logger.error("----------- xxl-job JobThread Exception:", e);
}
}
@ -124,6 +122,6 @@ public class JobThread extends Thread{
}
}
logger.info(">>>>>>>>>>>> xxl-job handlerThrad stoped, hashCode:{}", Thread.currentThread());
logger.info(">>>>>>>>>>>> xxl-job JobThread stoped, hashCode:{}", Thread.currentThread());
}
}

@ -31,7 +31,7 @@ public class TriggerCallbackThread {
break;
}
} catch (Exception e) {
logger.info("JobThread Exception:", e);
logger.error(">>>>>>>>>>> xxl-job TriggerCallbackThread Exception:", e);
}
}
}

@ -49,7 +49,7 @@ public class IpUtil {
return localAddress;
}
} catch (Throwable e) {
logger.warn("Failed to retriving ip address, " + e.getMessage(), e);
logger.error("Failed to retriving ip address, " + e.getMessage(), e);
}
try {
Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
@ -66,17 +66,17 @@ public class IpUtil {
return address;
}
} catch (Throwable e) {
logger.warn("Failed to retriving ip address, " + e.getMessage(), e);
logger.error("Failed to retriving ip address, " + e.getMessage(), e);
}
}
}
} catch (Throwable e) {
logger.warn("Failed to retriving ip address, " + e.getMessage(), e);
logger.error("Failed to retriving ip address, " + e.getMessage(), e);
}
}
}
} catch (Throwable e) {
logger.warn("Failed to retriving ip address, " + e.getMessage(), e);
logger.error("Failed to retriving ip address, " + e.getMessage(), e);
}
logger.error("Could not get local host ip address, will use 127.0.0.1 instead.");
return localAddress;

@ -112,7 +112,7 @@ public class XxlJobNetCommUtil {
HttpEntity entity = response.getEntity();
if (response.getStatusLine().getStatusCode() == 200 && null != entity) {
String responseHex = EntityUtils.toString(entity, "UTF-8");
logger.info("xxl-job, net comm success, requestHex:{}, responseHex:{}", requestHex, responseHex);
logger.debug("xxl-job, net comm success, requestHex:{}, responseHex:{}", requestHex, responseHex);
EntityUtils.consume(entity);
// i do not know why
@ -133,7 +133,7 @@ public class XxlJobNetCommUtil {
failMsg = "http statusCode error, statusCode:" + response.getStatusLine().getStatusCode();
}
} catch (Exception e) {
logger.info("", e);
logger.error("", e);
/*StringWriter out = new StringWriter();
e.printStackTrace(new PrintWriter(out));
callback.setMsg(out.toString());*/
@ -146,7 +146,7 @@ public class XxlJobNetCommUtil {
try {
httpClient.close();
} catch (IOException e) {
logger.info("", e);
logger.error("", e);
}
}
}

Loading…
Cancel
Save