-
Notifications
You must be signed in to change notification settings - Fork 588
fix(docker): enable docker logs for pd/store/server containers #2980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
fe5185f
783399f
34a4cb6
2e8fd3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,17 +99,26 @@ 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..." | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The safer, lower-risk approach is to add an explicit switch for Docker/stdout mode instead of removing That keeps the binary-package flow unchanged and still lets containers stream clean logs via I would keep the file-based behavior by default, then enable stdout only in the Docker entrypoint and wire the console appender in the matching log config. |
||
| "${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 & | ||
| if [[ "${STDOUT_MODE:-false}" == "true" ]]; then | ||
| "${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \ | ||
| "${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" & | ||
| else | ||
| "${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 & | ||
| fi | ||
| 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 | ||
| if [[ "${STDOUT_MODE:-false}" == "true" ]]; then | ||
| "${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \ | ||
| "${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" | ||
| else | ||
| "${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 | ||
| fi | ||
| fi | ||
|
|
||
| PID="$!" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,6 +117,7 @@ | |
|
|
||
| <loggers> | ||
| <root level="INFO"> | ||
| <appender-ref ref="console"/> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| <appender-ref ref="file"/> | ||
| </root> | ||
|
Comment on lines
118
to
122
|
||
| <logger name="com.alipay.sofa" level="INFO" additivity="false"> | ||
|
|
||
There was a problem hiding this comment.
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
consoleto<root>won’t surface logs from anyadditivity="false"loggers that only write toraft_file/file. If the goal is comprehensivedocker logsoutput, consider also wiringconsoleinto those additivity=false logger definitions (this matches the wiring used inhg-pd-service/src/main/resources/log4j2.xml).