Commit a8872842 by 姚冰

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

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