diff --git a/src/main/java/org/codelibs/fess/exec/Crawler.java b/src/main/java/org/codelibs/fess/exec/Crawler.java index 57fe79a40..4bc2c65d4 100644 --- a/src/main/java/org/codelibs/fess/exec/Crawler.java +++ b/src/main/java/org/codelibs/fess/exec/Crawler.java @@ -18,6 +18,7 @@ package org.codelibs.fess.exec; import java.io.File; import java.io.IOException; import java.io.Serializable; +import java.lang.management.ManagementFactory; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; @@ -140,6 +141,13 @@ public class Crawler implements Serializable { return idList; } + @Override + public String toString() { + return "Options [sessionId=" + sessionId + ", name=" + name + ", webConfigIds=" + webConfigIds + ", fileConfigIds=" + + fileConfigIds + ", dataConfigIds=" + dataConfigIds + ", propertiesPath=" + propertiesPath + ", expires=" + expires + + "]"; + } + } public static void main(final String[] args) { @@ -155,6 +163,17 @@ public class Crawler implements Serializable { return; } + if (logger.isDebugEnabled()) { + try { + ManagementFactory.getRuntimeMXBean().getInputArguments().stream().forEach(s -> logger.debug("Parameter: " + s)); + System.getProperties().entrySet().stream().forEach(e -> logger.debug("Property: " + e.getKey() + "=" + e.getValue())); + System.getenv().entrySet().forEach(e -> logger.debug("Env: " + e.getKey() + "=" + e.getValue())); + logger.debug("Option: " + options); + } catch (Exception e) { + // ignore + } + } + final String transportAddresses = System.getProperty(Constants.FESS_ES_TRANSPORT_ADDRESSES); if (StringUtil.isNotBlank(transportAddresses)) { System.setProperty(EsClient.TRANSPORT_ADDRESSES, transportAddresses); diff --git a/src/main/java/org/codelibs/fess/exec/SuggestCreator.java b/src/main/java/org/codelibs/fess/exec/SuggestCreator.java index 541f8fefc..95a279221 100644 --- a/src/main/java/org/codelibs/fess/exec/SuggestCreator.java +++ b/src/main/java/org/codelibs/fess/exec/SuggestCreator.java @@ -18,6 +18,7 @@ package org.codelibs.fess.exec; import java.io.File; import java.io.IOException; import java.io.Serializable; +import java.lang.management.ManagementFactory; import java.time.LocalDateTime; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; @@ -60,6 +61,11 @@ public class SuggestCreator implements Serializable { protected Options() { // noghing } + + @Override + public String toString() { + return "Options [sessionId=" + sessionId + ", name=" + name + ", propertiesPath=" + propertiesPath + "]"; + } } public static void main(final String[] args) { @@ -75,6 +81,17 @@ public class SuggestCreator implements Serializable { return; } + if (logger.isDebugEnabled()) { + try { + ManagementFactory.getRuntimeMXBean().getInputArguments().stream().forEach(s -> logger.debug("Parameter: " + s)); + System.getProperties().entrySet().stream().forEach(e -> logger.debug("Property: " + e.getKey() + "=" + e.getValue())); + System.getenv().entrySet().forEach(e -> logger.debug("Env: " + e.getKey() + "=" + e.getValue())); + logger.debug("Option: " + options); + } catch (Exception e) { + // ignore + } + } + final String transportAddresses = System.getProperty(Constants.FESS_ES_TRANSPORT_ADDRESSES); if (StringUtil.isNotBlank(transportAddresses)) { System.setProperty(EsClient.TRANSPORT_ADDRESSES, transportAddresses);