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))