Core Java

GC Logs changes for migrating from JDK 8 to JDK 11


Moving from JDK 8 to JDK 11 is quiet subtle. One issue which many people have faced is regarding is GC Logs.


JDK 11 uses generic logging mechanism. So flags like PrintGCDetails, PrintGCDateStamps don’t work anymore. The new format is easy to use once you understand it.

Format is :

[tag selection][:[output][:[decorators][:output-options]]]

There are 4 sections to it :

  1. What operation do you want to log and what level you want to log.
  2. Where do you want to log.
  3. What parameter’s you want to log.
  4. Any additional options.

For e.g.


In the above case, we wanted to see gc logs at specified log file showing mentioned variable with max of 3 back up files to be rolled when main file reached 100 MB.

More information is available at:

Published on Java Code Geeks with permission by Abhijeet Iyengar, partner at our JCG program. See the original article here: GC Logs changes for migrating from JDK 8 to JDK 11.

Opinions expressed by Java Code Geeks contributors are their own.

Abhijeet Iyengar

Abhijeet is a Software Engineer working with financial client . He has been involved in building UI and service based applications.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Back to top button