-Xverbosegclog

Causes -verbose:gc output to be written to a specified file.

-Xverbosegclog[:<file>[,<X>,<Y>]]
If the file cannot be found, -verbose:gc tries to create the file, and then continues as normal if it is successful. If it cannot create the file (for example, if an invalid filename is passed into the command), it redirects the output to stderr.

If you specify <X> and <Y> the -verbose:gc output is redirected to X files, each containing Y GC cycles.

The dump agent tokens can be used in the filename. See Dump agent tokens for more information. If you do not specify <file>, verbosegc.%Y%m%d.%H%M%S.%pid.txt is used.

By default, no verbose GC logging occurs.