|
@@ -27,6 +27,7 @@ import java.util.Properties;
|
|
|
import org.apache.commons.io.FileUtils;
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
import org.apache.logging.log4j.Logger;
|
|
|
+import org.codelibs.core.lang.StringUtil;
|
|
|
import org.codelibs.core.timer.TimeoutManager;
|
|
|
import org.codelibs.core.timer.TimeoutTask;
|
|
|
import org.codelibs.fess.Constants;
|
|
@@ -49,6 +50,8 @@ public abstract class ExecJob {
|
|
|
|
|
|
protected String logLevel;
|
|
|
|
|
|
+ protected String logSuffix = StringUtil.EMPTY;
|
|
|
+
|
|
|
protected List<String> jvmOptions = new ArrayList<>();
|
|
|
|
|
|
protected String lastaEnv;
|
|
@@ -86,6 +89,11 @@ public abstract class ExecJob {
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
+ public ExecJob logSuffix(final String logSuffix) {
|
|
|
+ this.logSuffix = logSuffix.trim().replaceAll("\\s", "_");
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
public ExecJob timeout(final int timeout) {
|
|
|
this.timeout = timeout;
|
|
|
return this;
|
|
@@ -196,4 +204,11 @@ public abstract class ExecJob {
|
|
|
throw new IORuntimeException(e);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ protected String getLogName(final String logPrefix) {
|
|
|
+ if (logSuffix.length() > 0) {
|
|
|
+ return logPrefix + "-" + getExecuteType() + "-" + logSuffix;
|
|
|
+ }
|
|
|
+ return logPrefix + "-" + getExecuteType();
|
|
|
+ }
|
|
|
}
|