imbajin commented on code in PR #2980:
URL: https://github.com/apache/hugegraph/pull/2980#discussion_r3033355113
##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh:
##########
@@ -183,6 +183,11 @@ if [ "${OPEN_TELEMETRY}" == "true" ]; then
fi
# Turn on security check
-exec ${JAVA} -Dname="HugeGraphServer" ${JVM_OPTIONS} ${JAVA_OPTIONS} -cp
${CLASSPATH}: \
- org.apache.hugegraph.dist.HugeGraphServer ${GREMLIN_SERVER_CONF}
${REST_SERVER_CONF} \
- >> ${OUTPUT} 2>&1
+if [[ "${STDOUT_MODE:-false}" == "true" ]]; then
+ exec ${JAVA} -Dname="HugeGraphServer" ${JVM_OPTIONS} ${JAVA_OPTIONS} -cp
${CLASSPATH}: \
+ org.apache.hugegraph.dist.HugeGraphServer ${GREMLIN_SERVER_CONF}
${REST_SERVER_CONF}
+else
+ exec ${JAVA} -Dname="HugeGraphServer" ${JVM_OPTIONS} ${JAVA_OPTIONS} -cp
${CLASSPATH}: \
+ org.apache.hugegraph.dist.HugeGraphServer ${GREMLIN_SERVER_CONF}
${REST_SERVER_CONF} \
+ >> ${OUTPUT} 2>&1
Review Comment:
⚠️ In the default non-Docker path (`STDOUT_MODE=false`), this still
redirects JVM stdout/stderr to the same file used by the Log4j file appender
(`logs/hugegraph-server.log`). With console now enabled, this can duplicate
entries in that file and accelerate rollover.
To keep the default package flow stable while avoiding duplicate lines,
please redirect this shell-level stream to a dedicated stdout log file:
```suggestion
>> ${LOGS}/hugegraph-server-stdout.log 2>&1
```
##########
docker/docker-compose.yml:
##########
@@ -41,6 +41,7 @@ services:
HG_PD_RAFT_PEERS_LIST: pd:8610
HG_PD_INITIAL_STORE_LIST: store:8500
HG_PD_DATA_PATH: /hugegraph-pd/pd_data
+ STDOUT_MODE: true
Review Comment:
🧹 Please quote this value for consistency with the other compose file and
with the shell check `[[ "${STDOUT_MODE:-false}" == "true" ]]`, so the env
value is always an explicit string.
```suggestion
STDOUT_MODE: "true"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]