From deaeb00f74f17380699ee79a572e285456ad7c13 Mon Sep 17 00:00:00 2001 From: "chen.ma" Date: Wed, 17 Nov 2021 21:19:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=97=B6=E6=8C=87=E5=AE=9A=E9=BB=98=E8=AE=A4=E7=A7=9F?= =?UTF-8?q?=E6=88=B7.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/hippo4j/tools/logrecord/aop/LogRecordAspect.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hippo4j-tools/log-record-tool/src/main/java/cn/hippo4j/tools/logrecord/aop/LogRecordAspect.java b/hippo4j-tools/log-record-tool/src/main/java/cn/hippo4j/tools/logrecord/aop/LogRecordAspect.java index 0b0ebd6d..8f7d4feb 100644 --- a/hippo4j-tools/log-record-tool/src/main/java/cn/hippo4j/tools/logrecord/aop/LogRecordAspect.java +++ b/hippo4j-tools/log-record-tool/src/main/java/cn/hippo4j/tools/logrecord/aop/LogRecordAspect.java @@ -148,8 +148,9 @@ public class LogRecordAspect { Map expressionValues = logRecordValueParser.processTemplate(spElTemplates, ret, targetClass, method, args, errorMsg, functionNameAndReturnMap); if (logConditionPassed(operation.getCondition(), expressionValues)) { + String tenant = environment.getProperty("tenant"); LogRecordInfo logRecordInfo = LogRecordInfo.builder() - .tenant(environment.getProperty("tenant")) + .tenant(StringUtils.isEmpty(tenant) ? "hippo4j" : tenant) .bizKey(expressionValues.get(operation.getBizKey())) .bizNo(expressionValues.get(operation.getBizNo())) .operator(getRealOperatorId(operation, operatorIdFromService, expressionValues))