Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PD, Store process log files do not scroll
  • Loading branch information
haohao0103 committed Jul 12, 2024
1 parent e1bd708 commit 16fd868
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,11 @@ if [ $(ps -ef|grep -v grep| grep java|grep -cE ${CONF}) -ne 0 ]; then
fi
echo "Starting HugeGraphPDServer..."


JVM_OPTIONS="-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="$!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<!-- Use mixed async way to output logs -->
<logger name="org.apache.hugegraph" level="INFO" additivity="false">
<appender-ref ref="file"/>
<appender-ref ref="console"/>
<!-- <appender-ref ref="console"/>-->
</logger>
</loggers>
</configuration>
7 changes: 6 additions & 1 deletion hugegraph-pd/hg-pd-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@
<version>2.7</version>
<scope>compile</scope>
</dependency>

<!-- Bridge from JUL to Log4j 2 -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jul</artifactId>
<version>2.17.2</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<!-- Use mixed async way to output logs -->
<logger name="org.apache.hugegraph" level="INFO" additivity="false">
<appender-ref ref="file"/>
<appender-ref ref="console"/>
<!-- <appender-ref ref="console"/>-->
</logger>
</loggers>
</configuration>
6 changes: 6 additions & 0 deletions hugegraph-store/hg-store-node/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@
<artifactId>log4j-api</artifactId>
<version>2.17.2</version>
</dependency>
<!-- Bridge from JUL to Log4j 2 -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jul</artifactId>
<version>2.17.2</version>
</dependency>
<!-- module end -->
</dependencies>

Expand Down

0 comments on commit 16fd868

Please sign in to comment.