diff --git a/deploy/deploy-gateway/src/main/resources/config/log4j2-gw.xml b/deploy/deploy-gateway/src/main/resources/config/log4j2-gw.xml index 437bc6f0..7a9914af 100644 --- a/deploy/deploy-gateway/src/main/resources/config/log4j2-gw.xml +++ b/deploy/deploy-gateway/src/main/resources/config/log4j2-gw.xml @@ -2,7 +2,7 @@ - + - + - + @@ -26,9 +26,10 @@ - + + - + diff --git a/deploy/deploy-gateway/src/main/resources/scripts/startup.sh b/deploy/deploy-gateway/src/main/resources/scripts/startup.sh index 2db26ec4..a38f2f62 100644 --- a/deploy/deploy-gateway/src/main/resources/scripts/startup.sh +++ b/deploy/deploy-gateway/src/main/resources/scripts/startup.sh @@ -19,8 +19,8 @@ APP_HOME=$(cd `dirname $0`;cd ../; pwd) #Lib目录 APP_LIB_PATH=$APP_HOME/lib -#节点输出日志路径 -LOG_OUT=$APP_HOME/logs +#nohup输出日志路径 +LOG_OUT=$APP_HOME/bin/gw.out #获取Peer节点的启动Jar包 APP_JAR=$(ls $APP_LIB_PATH | grep $APP_JAR_PREFIX) @@ -32,7 +32,7 @@ CONFIG_PATH=$APP_HOME/config GATEWAY_CONFIG=$CONFIG_PATH/gateway.conf #定义程序启动的参数 -JAVA_OPTS="-jar -server -Xms1024m -Xmx1024m -Djdchain.log=$LOG_OUT -Dlogging.config=file:$APP_HOME/config/log4j2-gw.xml" +JAVA_OPTS="-jar -server -Xms1024m -Xmx1024m -Djdchain.log=$APP_HOME/logs -Dlogging.config=file:$APP_HOME/config/log4j2-gw.xml" #APP具体相关命令 APP_CMD=$APP_LIB_PATH/$APP_JAR" -c "$GATEWAY_CONFIG @@ -90,7 +90,7 @@ if [[ $psid -ne 0 ]]; then echo "================================" else echo "Starting Gateway ......" - nohup $JAVA_BIN $JAVA_OPTS $APP_CMD $* & + nohup $JAVA_BIN $JAVA_OPTS $APP_CMD $* >$LOG_OUT 2>&1 & JAVA_CMD="$JAVA_BIN $JAVA_OPTS $APP_CMD $*" sleep 1 checkpid diff --git a/deploy/deploy-peer/src/main/resources/config/log4j2-peer.xml b/deploy/deploy-peer/src/main/resources/config/log4j2-peer.xml index e5ab655a..ad218870 100644 --- a/deploy/deploy-peer/src/main/resources/config/log4j2-peer.xml +++ b/deploy/deploy-peer/src/main/resources/config/log4j2-peer.xml @@ -2,7 +2,7 @@ - + - + - + @@ -26,9 +26,10 @@ - + + - + diff --git a/deploy/deploy-peer/src/main/resources/scripts/peer-startup.sh b/deploy/deploy-peer/src/main/resources/scripts/peer-startup.sh index 1823ad19..e54c7d38 100644 --- a/deploy/deploy-peer/src/main/resources/scripts/peer-startup.sh +++ b/deploy/deploy-peer/src/main/resources/scripts/peer-startup.sh @@ -30,6 +30,9 @@ APP_HOME=$(cd `dirname $0`;cd ../; pwd) #System目录 APP_SYSTEM_PATH=$APP_HOME/system +#nohup输出日志路径 +LOG_OUT=$APP_HOME/bin/peer.out + #获取Peer节点的启动Jar包 APP_JAR=$(ls $APP_SYSTEM_PATH | grep $APP_JAR_PREFIX) @@ -101,7 +104,7 @@ if [[ $psid -ne 0 ]]; then echo "================================" else echo "Starting Peer ......" - nohup $JAVA_BIN $JAVA_OPTS $APP_CMD $* & + nohup $JAVA_BIN $JAVA_OPTS $APP_CMD $* >$LOG_OUT 2>&1 & JAVA_CMD="$JAVA_BIN $JAVA_OPTS $APP_CMD $*" sleep 1 checkpid