add debug logs

This commit is contained in:
Shinsuke Sugaya 2019-09-24 06:26:28 +09:00
parent 9dd69d5491
commit b3c97f9d7d
31 changed files with 102 additions and 0 deletions

View file

@ -31,6 +31,9 @@ public class FessFileTransformer extends AbstractFessFileTransformer {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
fessConfig = ComponentUtil.getFessConfig();
}

View file

@ -31,6 +31,9 @@ public class FessStandardTransformer extends AbstractFessFileTransformer {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
fessConfig = ComponentUtil.getFessConfig();
}

View file

@ -108,6 +108,9 @@ public class FessXpathTransformer extends XpathTransformer implements FessTransf
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
fessConfig = ComponentUtil.getFessConfig();
}

View file

@ -41,6 +41,9 @@ public class DictionaryManager {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
creatorList.forEach(creator -> {
creator.setDictionaryManager(this);
});

View file

@ -49,6 +49,9 @@ public class IndexUpdateCallbackImpl implements IndexUpdateCallback {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
maxDocumentRequestSize = ComponentUtil.getFessConfig().getIndexerDataMaxDocumentRequestSizeAsInteger().longValue();
}

View file

@ -232,6 +232,9 @@ public class FessEsClient implements Client {
@PostConstruct
public void open() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
final FessConfig fessConfig = ComponentUtil.getFessConfig();
String httpAddress = System.getProperty(Constants.FESS_ES_HTTP_ADDRESS);

View file

@ -65,6 +65,9 @@ public class CrawlingConfigHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
crawlingConfigCache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(10, TimeUnit.MINUTES).build();
}

View file

@ -70,6 +70,9 @@ public class DocumentHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
try {
final TikaExtractor tikaExtractor = ComponentUtil.getComponent("tikaExtractor");
if (tikaExtractor != null) {

View file

@ -23,13 +23,19 @@ import javax.annotation.PostConstruct;
import org.codelibs.fess.app.service.DuplicateHostService;
import org.codelibs.fess.es.config.exentity.DuplicateHost;
import org.codelibs.fess.util.ComponentUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DuplicateHostHelper {
private static final Logger logger = LoggerFactory.getLogger(DuplicateHostHelper.class);
protected List<DuplicateHost> duplicateHostList;
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
if (duplicateHostList == null) {
duplicateHostList = new ArrayList<>();
}

View file

@ -53,6 +53,9 @@ public class KeyMatchHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
reload(0);
}

View file

@ -47,6 +47,9 @@ public class LabelTypeHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
update();
}

View file

@ -41,6 +41,9 @@ public class LanguageHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
final FessConfig fessConfig = ComponentUtil.getFessConfig();
langFields = fessConfig.getIndexerLanguageFieldsAsArray();
supportedLanguages = fessConfig.getSupportedLanguagesAsArray();

View file

@ -48,6 +48,9 @@ public class OpenSearchHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
if (StringUtil.isNotBlank(osddPath)) {
final String path = LaServletContextUtil.getServletContext().getRealPath(osddPath);
osddFile = new File(path);

View file

@ -51,6 +51,9 @@ public class PathMappingHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
update();
}

View file

@ -48,6 +48,9 @@ public class PopularWordHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
fessConfig = ComponentUtil.getFessConfig();
cache =
CacheBuilder.newBuilder().maximumSize(fessConfig.getSuggestPopularWordCacheSizeAsInteger().longValue())

View file

@ -77,8 +77,11 @@ import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
import org.lastaflute.core.message.UserMessages;
import org.lastaflute.web.util.LaRequestUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class QueryHelper {
private static final Logger logger = LoggerFactory.getLogger(QueryHelper.class);
protected static final String PREFERENCE_QUERY = "_query";
@ -136,6 +139,9 @@ public class QueryHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
final FessConfig fessConfig = ComponentUtil.getFessConfig();
if (responseFields == null) {
responseFields = fessConfig.getQueryAdditionalResponseFields(//

View file

@ -45,6 +45,9 @@ public class RelatedContentHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
reload();
}

View file

@ -27,13 +27,19 @@ import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.es.config.exbhv.RelatedQueryBhv;
import org.codelibs.fess.es.config.exentity.RelatedQuery;
import org.codelibs.fess.util.ComponentUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class RelatedQueryHelper {
private static final Logger logger = LoggerFactory.getLogger(RelatedQueryHelper.class);
protected volatile Map<String, Map<String, String[]>> relatedQueryMap = Collections.emptyMap();
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
reload();
}

View file

@ -79,6 +79,9 @@ public class RoleQueryHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
stream(ComponentUtil.getFessConfig().getSearchDefaultPermissionsAsArray()).of(stream -> stream.forEach(name -> {
defaultRoleList.add(name);
}));

View file

@ -50,6 +50,9 @@ public class SambaHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
fessConfig = ComponentUtil.getFessConfig();
}

View file

@ -77,6 +77,9 @@ public class SearchLogHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
userInfoCache = CacheBuilder.newBuilder()//
.maximumSize(userInfoCacheSize)//
.expireAfterWrite(userCheckInterval, TimeUnit.MILLISECONDS)//

View file

@ -85,6 +85,9 @@ public class SuggestHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
fessConfig = ComponentUtil.getFessConfig();
split(fessConfig.getSuggestFieldContents(), ",").of(
stream -> stream.filter(StringUtil::isNotBlank).forEach(contentFieldNameSet::add));

View file

@ -106,6 +106,9 @@ public class SystemHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
final FessConfig fessConfig = ComponentUtil.getFessConfig();
filterPathEncoding = fessConfig.getPathEncoding();
supportedLanguages = fessConfig.getSupportedLanguagesAsArray();

View file

@ -140,6 +140,9 @@ public class ViewHelper {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
final FessConfig fessConfig = ComponentUtil.getFessConfig();
escapedHighlightPre = LaFunctions.h(originalHighlightTagPre);
escapedHighlightPost = LaFunctions.h(originalHighlightTagPost);

View file

@ -71,6 +71,9 @@ public class LdapManager {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
fessConfig = ComponentUtil.getFessConfig();
}

View file

@ -67,6 +67,9 @@ public class GoogleAnalyticsScoreBooster extends ScoreBooster {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
if (!Paths.get(keyFileLocation).toFile().exists()) {
logger.info("GA Key File does not exist.");
return;

View file

@ -113,6 +113,9 @@ public class AzureAdAuthenticator implements SsoAuthenticator {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
ComponentUtil.getSsoManager().register(this);
groupCache = CacheBuilder.newBuilder().expireAfterWrite(groupCacheExpiry, TimeUnit.SECONDS).build();
}

View file

@ -75,6 +75,9 @@ public class OpenIdConnectAuthenticator implements SsoAuthenticator {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
ComponentUtil.getSsoManager().register(this);
}

View file

@ -68,6 +68,9 @@ public class SpnegoAuthenticator implements SsoAuthenticator {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
ComponentUtil.getSsoManager().register(this);
}

View file

@ -88,6 +88,9 @@ public class ThumbnailManager {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
final String thumbnailPath = System.getProperty(Constants.FESS_THUMBNAIL_PATH);
if (thumbnailPath != null) {
baseDir = new File(thumbnailPath);

View file

@ -49,6 +49,9 @@ public class CommandGenerator extends BaseThumbnailGenerator {
@PostConstruct
public void init() {
if (logger.isDebugEnabled()) {
logger.debug("Initialize " + this.getClass().getSimpleName());
}
if (baseDir == null) {
baseDir = new File(System.getProperty("java.io.tmpdir"));
}