Java Garbage Collection Logging
Jump to navigation
Jump to search
Internal
Command Line Options
Java 8
Overview
In Java 8, GC logging is enabled with the -Xloggc:<file> (see below).
Options
-Xloggc
-Xloggc:<file>
where <file> can be absolute or relative. In case of a relative path, it is relative to the current directory.
-verbose:gc
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=5
-XX:GCLogFileSize=3M