Skip to content

Commit

Permalink
Fix Windows startup script runs in the background and outputs log fil…
Browse files Browse the repository at this point in the history
…es (#34021)

* Fix Windows startup script runs in the background and outputs log files

* Add `2>&1` for start.bat
  • Loading branch information
kid0510z authored Dec 12, 2024
1 parent 24bd285 commit bb101dc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion distribution/proxy/src/main/resources/bin/start.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@

cd %~dp0

set LOGS_DIR=..\logs

if not exist %LOGS_DIR% (
mkdir %LOGS_DIR%
)

set STDOUT_FILE=%LOGS_DIR%\stdout.log

set SERVER_NAME=ShardingSphere-Proxy

set CLASS_PATH="..;..\lib\*;..\ext-lib\*"
Expand Down Expand Up @@ -81,7 +89,7 @@ if %int_version% == 8 (

echo Starting the %SERVER_NAME% ...

java -server -Xmx2g -Xms2g -Xmn1g -Xss1m -XX:AutoBoxCacheMax=4096 -XX:+DisableExplicitGC -XX:LargePageSizeInBytes=128m %VERSION_OPTS% -Dfile.encoding=UTF-8 -Dio.netty.leakDetection.level=DISABLED -classpath %CLASS_PATH% %MAIN_CLASS%
javaw -server -Xmx2g -Xms2g -Xmn1g -Xss1m -XX:AutoBoxCacheMax=4096 -XX:+DisableExplicitGC -XX:LargePageSizeInBytes=128m %VERSION_OPTS% -Dfile.encoding=UTF-8 -Dio.netty.leakDetection.level=DISABLED -classpath %CLASS_PATH% %MAIN_CLASS% >> %STDOUT_FILE% 2>&1

goto exit

Expand Down

0 comments on commit bb101dc

Please sign in to comment.