-Xlog:gc:/var/log/java_gc.log is not work

43 views Asked by At

Output only to the console cannot be output to a specified log file

Reference document:https://www.graalvm.org/latest/reference-manual/native-image/optimizations-and-performance/MemoryManagement/

version:

java version "21.0.1" 2023-10-17
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)

Running parameter:

-Xmx1G \
-Xms1G \
-XX:InitiatingHeapOccupancyPercent=60 \
-XX:MaxGCPauseMillis=100 \
-XX:+VerboseGC \
-Xlog:gc:/var/log/java_gc.log
1

There are 1 answers