Skip to content

Commit

Permalink
完善配置日志。
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed Mar 7, 2024
1 parent 0a0ca3f commit 62e2948
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@

import org.apache.seata.common.util.DurationUtil;
import org.apache.seata.common.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* The type Abstract configuration.
*
*/
public abstract class AbstractConfiguration implements Configuration {

private static final Logger LOGGER = LoggerFactory.getLogger(AbstractConfiguration.class);

/**
* The constant DEFAULT_CONFIG_TIMEOUT.
*/
Expand Down Expand Up @@ -136,9 +140,13 @@ public String getConfig(String dataId, long timeoutMills) {
public String getConfig(String dataId, String content, long timeoutMills) {
String value = getConfigFromSys(dataId);
if (value != null) {
LOGGER.info("Get config from system property, {}={}, type={}", dataId, value, getTypeName());
return value;
}
return getLatestConfig(dataId, content, timeoutMills);

value = getLatestConfig(dataId, content, timeoutMills);
LOGGER.info("Get config {}={}, type={}", dataId, value, getTypeName());
return value;
}

@Override
Expand Down

0 comments on commit 62e2948

Please sign in to comment.