Commit 5b447a09 by jinxin

统一日志接入

parent b8a1ccd4
package com.gic.haoban.manage.web.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.haoban.common.anno.IgnoreLogin;
import com.gic.haoban.manage.api.dto.TabHaobanAppLogDTO;
import com.gic.haoban.manage.api.service.TabHaobanAppLogApiService;
import com.gic.haoban.manage.web.qo.TabHaobanAppLogQO;
import jdk.nashorn.internal.ir.annotations.Ignore;
import com.gic.log.record.bean.WebErrorLogReport;
import com.gic.log.record.util.LogWebErrorLogReportUtil;
import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
......@@ -25,16 +21,13 @@ public class TabHaobanAppLogController {
private static org.apache.logging.log4j.Logger logger = LogManager.getLogger(TabHaobanAppLogController.class);
@Autowired
private TabHaobanAppLogApiService tabHaobanAppLogApiService;
@RequestMapping("/insert_log")
@ResponseBody
@IgnoreLogin
@com.gic.web.common.ano.IgnoreLogin
public RestResponse<Boolean> insertLog(@RequestBody TabHaobanAppLogQO qo) {
public RestResponse<Boolean> insertLog(@RequestBody WebErrorLogReport qo) {
logger.info("插入日志的参数:{}", JSON.toJSONString(qo));
tabHaobanAppLogApiService.insert(JSONObject.parseObject(JSONObject.toJSONString(qo), TabHaobanAppLogDTO.class));
LogWebErrorLogReportUtil.pushWebErrorLogReport(qo);
return RestResponse.successResult();
}
......
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