Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ JVM_OPTIONS="-Dlog4j.configurationFile=${CONF}/log4j2.xml -Djava.util.logging.ma

# Turn on security check
exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar >> ${OUTPUT} 2>&1 &
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar &

PID="$!"
# Write pid to file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@

<loggers>
<root level="INFO">
<appender-ref ref="console" />
<appender-ref ref="file" />
</root>
Comment on lines 116 to 120
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with the other dist configs, adding console to <root> won’t surface logs from any additivity="false" loggers that only write to raft_file/file. If the goal is comprehensive docker logs output, consider also wiring console into those additivity=false logger definitions (this matches the wiring used in hg-pd-service/src/main/resources/log4j2.xml).

Copilot uses AI. Check for mistakes.
<logger name="com.alipay.sofa" level="INFO" additivity="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,4 @@ 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
org.apache.hugegraph.dist.HugeGraphServer ${GREMLIN_SERVER_CONF} ${REST_SERVER_CONF}
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,14 @@ if [[ $PRELOAD == "true" ]]; then
sed -i -e '/registerBackends/d; /serverStarted/d' "${SCRIPTS}/${EXAMPLE_SCRIPT}"
fi

# TODO: show the output message in hugegraph-server.sh when start the server
if [[ $DAEMON == "true" ]]; then
echo "Starting HugeGraphServer in daemon mode..."
"${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" \
>>"${LOGS}"/hugegraph-server.log 2>&1 &
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" &
else
echo "Starting HugeGraphServer in foreground mode..."
"${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" \
>>"${LOGS}"/hugegraph-server.log 2>&1
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}"
fi

PID="$!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@

<loggers>
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="file"/>
</root>
<logger name="org.apache.cassandra" level="INFO" additivity="false">
Expand All @@ -129,6 +130,7 @@
</logger>
<!-- Use mixed async way to output logs -->
<AsyncLogger name="org.apache.hugegraph" level="INFO" additivity="false">
<appender-ref ref="console"/>
<appender-ref ref="file"/>
</AsyncLogger>
<AsyncLogger name="org.apache.hugegraph.auth" level="INFO" additivity="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ echo "Starting HG-StoreServer..."

exec ${JAVA} -Dname="HugeGraphStore" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml \
${LIB}/hg-store-node-*.jar >> ${OUTPUT} 2>&1 &
${LIB}/hg-store-node-*.jar &

PID="$!"
# Write pid to file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@

<loggers>
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="file"/>
</root>
Comment on lines 118 to 122
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the console appender to the root logger won’t make logs from loggers with additivity="false" appear in docker logs. In this config, com.alipay.sofa (and other explicitly configured loggers) only write to raft_file/file, so raft/third‑party logs will still be missing from stdout. Consider also adding a console appender-ref to those additivity=false loggers (or revisiting additivity) to fully achieve the Docker logging goal.

Copilot uses AI. Check for mistakes.
<logger name="com.alipay.sofa" level="INFO" additivity="false">
Expand Down
Loading