Here is a list of garbage collection logging options and flags we had available to us before the introduction of Java 9's logging framework:
Garbage collection logging option | JVM option flag(s) |
This prints the basic garbage collection information. | -verbose:gc or -XX:+PrintGC |
This will print more detailed garbage collection information. | -XX:+PrintGCDetails |
You can print timestamps for each garbage collection event. The seconds are sequential and begin from the JVM start time. | -XX:+PrintGCTimeStamps |
You can print date stamps for each garbage collection event. Sample format: 2017-07-26T03:19:00.319+400:[GC . . . ] |
-XX:+PrintGCDateStamps |
You can use this flag to print timestamps for individual ... |