From a16289277ee05dbd3b81a617249b2e4f57a65549 Mon Sep 17 00:00:00 2001 From: smallchill Date: Mon, 24 Dec 2018 13:23:56 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/springblade/core/log/event/ApiLogListener.java | 2 +- .../java/org/springblade/core/log/event/BladeLogListener.java | 4 ++-- .../java/org/springblade/core/log/event/ErrorLogListener.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/blade-core-log/src/main/java/org/springblade/core/log/event/ApiLogListener.java b/blade-core-log/src/main/java/org/springblade/core/log/event/ApiLogListener.java index 75639a4..8f50044 100644 --- a/blade-core-log/src/main/java/org/springblade/core/log/event/ApiLogListener.java +++ b/blade-core-log/src/main/java/org/springblade/core/log/event/ApiLogListener.java @@ -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); } diff --git a/blade-core-log/src/main/java/org/springblade/core/log/event/BladeLogListener.java b/blade-core-log/src/main/java/org/springblade/core/log/event/BladeLogListener.java index abd648f..cd85b57 100644 --- a/blade-core-log/src/main/java/org/springblade/core/log/event/BladeLogListener.java +++ b/blade-core-log/src/main/java/org/springblade/core/log/event/BladeLogListener.java @@ -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); diff --git a/blade-core-log/src/main/java/org/springblade/core/log/event/ErrorLogListener.java b/blade-core-log/src/main/java/org/springblade/core/log/event/ErrorLogListener.java index c49c436..67e5424 100644 --- a/blade-core-log/src/main/java/org/springblade/core/log/event/ErrorLogListener.java +++ b/blade-core-log/src/main/java/org/springblade/core/log/event/ErrorLogListener.java @@ -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); }