Browse Source

日志文件分隔

lizw 3 năm trước cách đây
mục cha
commit
100470c364
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      yxt/api-gateway.sh

+ 3 - 3
yxt/api-gateway.sh

@@ -5,7 +5,7 @@ set -e
 
 dirPath=~/deploy/yxt-api-gateway
 serverName=yxt_api_gateway
-logPath=~/logs/yxt-api-gateway.log
+logPath=/data/logs/soap_gateway_test/soap_gateway_test.log
 
 cmd=$1
 profiles=${2:-"dev"}
@@ -23,8 +23,8 @@ startServer() {
   if [ -z $pid ];then
     echo -e "$echoPrefix cd $dirPath $echoSuffix"
     cd $dirPath
-    echo -e "$echoPrefix java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./soap-gateway-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,$profiles --server.port=9000 >$logPath 2>&1 & $echoSuffix"
-    java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./soap-gateway-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,$profiles --server.port=9000 >$logPath 2>&1 &
+    echo -e "$echoPrefix java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./soap-gateway-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,$profiles --server.port=9000 >>/dev/null 2>&1 & $echoSuffix"
+    java $JAVA_MEM_OPTS $DATABASE_OPTS $JAVA_OPTS_EXT -jar ./soap-gateway-0.0.0-SNAPSHOT.jar --spring.profiles.active=global,$profiles --server.port=9000 >>/dev/null 2>&1 &
     echo "$serverName 启动成功!"
   else
     echo "$serverName 正在运行..."