[NO ISSUE][LOG] Ensure NC logDir ends with separator
- user model changes: no
- storage format changes: no
- interface changes: no
Change-Id: I492428fdbf84ed6f1c4afd136dce33ac84aea3c0
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2982
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <imaxon@apache.org>
diff --git a/asterixdb/asterix-server/src/main/opt/ansible/conf/cc.conf b/asterixdb/asterix-server/src/main/opt/ansible/conf/cc.conf
index e779dc2..2824219 100644
--- a/asterixdb/asterix-server/src/main/opt/ansible/conf/cc.conf
+++ b/asterixdb/asterix-server/src/main/opt/ansible/conf/cc.conf
@@ -17,6 +17,7 @@
[common]
log.level=INFO
+log.dir=logs
[nc]
txn.log.dir=txnlog
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCLogConfigurationFactory.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCLogConfigurationFactory.java
index 990d6c9..f4d10cb 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCLogConfigurationFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCLogConfigurationFactory.java
@@ -18,6 +18,9 @@
*/
package org.apache.hyracks.control.nc;
+import java.io.File;
+import java.net.URI;
+
import org.apache.hyracks.control.common.controllers.NCConfig;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.LoggerContext;
@@ -30,8 +33,6 @@
import org.apache.logging.log4j.core.config.builder.api.LayoutComponentBuilder;
import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration;
-import java.net.URI;
-
public class NCLogConfigurationFactory extends ConfigurationFactory {
private NCConfig config;
@@ -42,6 +43,7 @@
public Configuration createConfiguration(ConfigurationBuilder<BuiltConfiguration> builder) {
String nodeId = config.getNodeId();
String logDir = config.getLogDir();
+ logDir = logDir.endsWith(File.separator) ? logDir : logDir + File.separator;
builder.setStatusLevel(Level.WARN);
builder.setConfigurationName("RollingBuilder");
// create a rolling file appender