Save and restart the service. The GC log files will be written to the server log folder (for instance, gc.log).

​​​

More Information

INFA_More_Information

​Example for WINDOWS (add parameters as needed starting from last number +1)

wrapper.java.additional.34 = -XX:+PrintGCDetails

wrapper.java.additional.35 = -XX:+PrintGCDateStamps

wrapper.java.additional.36 = -Xloggc:./logs/gc.log

Hint

GC log gets overwritten every time the Java process starts if you do not use a unique file name.

Therefore, ensure that a different (unique) file name that gets generated on every restart, $$ and %p is added to the GC log file name in Linux and Windows respectively. In the UNIX environment, $$ will expand to the PID of the process and on Windows, %p expands to the PID of the process.

Windows

wrapper.java.additional.36 = -Xloggc:./logs/gc.%p.log

Linux

wrapper.java.additional.36 = -X​loggc:./logs/gc.$$.log

For log file rotation, add the following lines:

-XX:+UseGCLogFileRotation

-XX:NumberOfGCLogFiles=5 (number of files to use when rotating logs, must be >= 1)

-XX:GCLogFileSize=2M size (size of the log file at which point the log will be rotated, must be >= 8K)