Commit a8872842 by 姚冰

[chg] 写日志库注释,无查询的地方

1 parent d74f5873
......@@ -160,7 +160,7 @@ public class AuthInterceptor extends HandlerInterceptorAdapter {
//header user agent暂时不存
//.header(header)
.build();
accessLogService.saveAccessLogs(accessLog);
// accessLogService.saveAccessLogs(accessLog);
}
log.info("\n用户名:[{}]\n请求信息:[{}]\n请求方式:[{}]\n处理时长:[{}]\n", user.getUsername(), path, request.getMethod(), System.currentTimeMillis() - requestStart);
......
......@@ -15,8 +15,8 @@ import org.springframework.scheduling.annotation.Scheduled;
public class AccessLogsAggsTask {
private final static Logger logger = LoggerFactory.getLogger(AccessLogsAggsTask.class);
@Autowired
private ESClient esClient;
// @Autowired
// private ESClient esClient;
@Autowired
private IllegalProperties illegalProperties;
......
......@@ -16,15 +16,15 @@ import org.springframework.stereotype.Service;
public class AccessLogServiceImpl implements AccessLogService {
private final static Logger logger = LoggerFactory.getLogger(AccessLogServiceImpl.class);
@Autowired
private ESClient esClient;
// @Autowired
// private ESClient esClient;
@Override
public void saveAccessLogs(AccessLog accessLog) {
try {
esClient.saveOrUpdate(accessLog, true);
} catch (Exception e) {
logger.error("保存访问日志失败:{}", accessLog);
}
// try {
// esClient.saveOrUpdate(accessLog, true);
// } catch (Exception e) {
// logger.error("保存访问日志失败:{}", accessLog);
// }
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!