#1888 improve loggging

This commit is contained in:
Shinsuke Sugaya 2018-11-01 06:12:19 +09:00
parent 369bad035f
commit 41cffb81e1

View file

@ -54,11 +54,19 @@ public class SambaHelper {
}
public String getAccountId(final SID sid) {
final Integer sidType = fessConfig.getAvailableSmbSidType(sid.getType());
if (sidType != null) {
return createSearchRole(sidType, sid.getAccountName());
final int type = sid.getType();
if (logger.isDebugEnabled()) {
try {
logger.debug("Processing SID: {} {} {}", type, sid, sid.toDisplayString());
} catch (Exception e) {
// ignore
}
}
final Integer id = fessConfig.getAvailableSmbSidType(type);
if (id != null) {
return createSearchRole(id, sid.getAccountName());
} else if (logger.isDebugEnabled()) {
logger.debug("Ignore SID: {}", sid);
logger.debug("Ignored SID: {} {}", type, sid);
}
return null;
}