fix #2715 improve log messages

This commit is contained in:
Shinsuke Sugaya 2023-01-20 21:36:56 +09:00
parent b2e2cec129
commit 660be2024d

View file

@ -67,6 +67,11 @@ public class PathMappingHelper extends AbstractConfigHelper {
cb.query().setProcessType_InScope(ptList);
cb.fetchFirst(ComponentUtil.getFessConfig().getPagePathMappingMaxFetchSizeAsInteger());
});
if (logger.isDebugEnabled()) {
cachedPathMappingList.forEach(e -> {
logger.debug("path mapping: {}: {} -> {}", e.getId(), e.getRegex(), e.getReplacement());
});
}
return cachedPathMappingList.size();
} catch (final ComponentNotFoundException e) {
if (logger.isDebugEnabled()) {
@ -180,6 +185,9 @@ public class PathMappingHelper extends AbstractConfigHelper {
newUrl = pathMapping.process(this, newUrl);
}
}
if (logger.isDebugEnabled() && !StringUtil.equals(url, newUrl)) {
logger.debug("replace: {} -> {}", url, newUrl);
}
return newUrl;
}