Garbage collection logging options

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 ...

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.