This is an automated email from the ASF dual-hosted git repository.
jin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git
The following commit(s) were added to refs/heads/master by this push:
new 24ebe9da2 fix(pd/store): log files do not scroll with the process
(#2589)
24ebe9da2 is described below
commit 24ebe9da266e570247d4d85e21c2e4b44e079d4b
Author: haohao0103 <[email protected]>
AuthorDate: Fri Aug 2 17:58:12 2024 +0800
fix(pd/store): log files do not scroll with the process (#2589)
close #2581 GRPC Java defaults to using java. til.rogging (JUL) as its
logging framework,
---------
Co-authored-by: VGalaxies <[email protected]>
---
.../hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh | 4 +++-
hugegraph-pd/hg-pd-service/pom.xml | 7 ++++++-
.../hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh | 2 +-
hugegraph-store/hg-store-node/pom.xml | 6 ++++++
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git
a/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh
b/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh
index 722b864db..151465ec6 100644
--- a/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh
+++ b/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh
@@ -159,8 +159,10 @@ if [ $(ps -ef|grep -v grep| grep java|grep -cE ${CONF})
-ne 0 ]; then
fi
echo "Starting HugeGraphPDServer..."
+JVM_OPTIONS="-Dlog4j.configurationFile=${CONF}/log4j2.xml
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
+
# Turn on security check
-exec ${JAVA} -Dname="HugeGraphPD" ${JAVA_OPTIONS} -jar \
+exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml
${LIB}/hg-pd-service-*.jar >> ${OUTPUT} 2>&1 &
PID="$!"
diff --git a/hugegraph-pd/hg-pd-service/pom.xml
b/hugegraph-pd/hg-pd-service/pom.xml
index 682daba85..14fed89ee 100644
--- a/hugegraph-pd/hg-pd-service/pom.xml
+++ b/hugegraph-pd/hg-pd-service/pom.xml
@@ -139,7 +139,12 @@
<version>2.7</version>
<scope>compile</scope>
</dependency>
-
+ <!-- Bridge from JUL to Log4j -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jul</artifactId>
+ <version>2.17.2</version>
+ </dependency>
</dependencies>
<build>
<plugins>
diff --git
a/hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh
b/hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh
index 991d42767..b12fb354d 100644
---
a/hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh
+++
b/hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh
@@ -150,7 +150,7 @@ case "$GC_OPTION" in
exit 1
esac
-JVM_OPTIONS="-Dlog4j.configurationFile=${CONF}/log4j2.xml
-Dfastjson.parser.safeMode=true"
+JVM_OPTIONS="-Dlog4j.configurationFile=${CONF}/log4j2.xml
-Dfastjson.parser.safeMode=true
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
if [ "${OPEN_TELEMETRY}" == "true" ]; then
OT_JAR="opentelemetry-javaagent.jar"
diff --git a/hugegraph-store/hg-store-node/pom.xml
b/hugegraph-store/hg-store-node/pom.xml
index 90ba166ab..cf0444584 100644
--- a/hugegraph-store/hg-store-node/pom.xml
+++ b/hugegraph-store/hg-store-node/pom.xml
@@ -143,6 +143,12 @@
<artifactId>log4j-api</artifactId>
<version>2.17.2</version>
</dependency>
+ <!-- Bridge from JUL to Log4j -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jul</artifactId>
+ <version>2.17.2</version>
+ </dependency>
<!-- module end -->
</dependencies>