My Oracle Support Banner

How To Set GC Log on WebLogic (Doc ID 2727874.1)

Last updated on MAY 01, 2024

Applies to:

Oracle WebLogic Server - Version 10.3.6 to
Information in this document applies to any platform.


GC Log is an important log to observe memory utilization, GC time, and frequency of the Java process.

This log is a must for investigating OutOfMemoryError, hang, and performance issues.

This document applies the below versions.
- JDK 7u76 and later
- JDK 8

This document describes GC log options of JDK only.
Please see the following document on how to set the java options to WebLogic.
Best Practices to Configure JAVA_OPTIONS for Oracle Fusion Middleware / Oracle WebLogic Server (<Document 2160246.1>)


This document isn't applied to JDK 9 or later. So it does not apply to Oracle WebLogic Server 14.1.1 on JDK11.
Oracle WebLogic Server 14.1.1 will not be started if the GC log options on this document are set for JDK 9 or later.
Please see "Mapping Legacy Garbage Collection Logging Flags to the Xlog Configuration" for JDK11 and later.



To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document
 1. Typical GC log options which are needed to investigate memory issues at least
 2. Typical GC log options with log rotation options.
 3. Finest GC log options (-XX:+PrintHeapAtGC is added) with rotation
 Option details:
 GC Log rotation configurations:

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.