Make findMapper log to debug level to avoid nacos.log print much log. (#11786)

This commit is contained in:
杨翊 SionYang 2024-03-01 13:35:30 +08:00 committed by GitHub
parent 8f1cb59370
commit 64b9e8d3f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,7 +99,9 @@ public class MapperManager {
* @return mapper.
*/
public <R extends Mapper> R findMapper(String dataSource, String tableName) {
LOGGER.info("[MapperManager] findMapper dataSource: {}, tableName: {}", dataSource, tableName);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("[MapperManager] findMapper dataSource: {}, tableName: {}", dataSource, tableName);
}
if (StringUtils.isBlank(dataSource) || StringUtils.isBlank(tableName)) {
throw new NacosRuntimeException(FIND_DATASOURCE_ERROR_CODE, "dataSource or tableName is null");
}