mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-11-05 10:09:32 +08:00
⚡ 代码优化
This commit is contained in:
parent
8058ca9e06
commit
a16289277e
@ -65,7 +65,7 @@ public class ApiLogListener {
|
||||
logApi.setRequestUri(URLUtil.getPath(request.getRequestURI()));
|
||||
logApi.setMethod(request.getMethod());
|
||||
logApi.setParams(WebUtil.getRequestParamString(request));
|
||||
logApi.setCreateBy(SecureUtil.getUserAccount(request).getAccount());
|
||||
logApi.setCreateBy(SecureUtil.getUserAccount(request));
|
||||
logApi.setCreateTime(LocalDateTime.now());
|
||||
logService.saveApiLog(logApi);
|
||||
}
|
||||
|
@ -58,10 +58,10 @@ public class BladeLogListener {
|
||||
logBlade.setUserAgent(request.getHeader(WebUtil.USER_AGENT_HEADER));
|
||||
logBlade.setMethod(request.getMethod());
|
||||
logBlade.setParams(WebUtil.getRequestParamString(request));
|
||||
logBlade.setServiceId(bladeProperties.getName());
|
||||
logBlade.setServerHost(serverInfo.getHostName());
|
||||
logBlade.setServerIp(serverInfo.getIPWithPort());
|
||||
logBlade.setServiceId(bladeProperties.getName());
|
||||
logBlade.setEnv(bladeProperties.getEnv());
|
||||
logBlade.setServerIp(serverInfo.getIPWithPort());
|
||||
logBlade.setCreateBy(SecureUtil.getUserAccount(request));
|
||||
logBlade.setCreateTime(LocalDateTime.now());
|
||||
logService.saveBladeLog(logBlade);
|
||||
|
@ -60,7 +60,7 @@ public class ErrorLogListener {
|
||||
logError.setServerHost(serverInfo.getHostName());
|
||||
logError.setServerIp(serverInfo.getIPWithPort());
|
||||
logError.setEnv(bladeProperties.getEnv());
|
||||
logError.setCreateBy(SecureUtil.getUserAccount(request).getAccount());
|
||||
logError.setCreateBy(SecureUtil.getUserAccount(request));
|
||||
logError.setCreateTime(LocalDateTime.now());
|
||||
logService.saveErrorLog(logError);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user