RDP16
RDP16

Reputation: 53

GC Log roation with compression paramewter in JDK 8

I am trying GC log rotation in JDK 8.So I have achieved it by using below GC Log JVM parameter

-XX:+PrintGCDetails  -XX:+PrintGCTimeStamps  -Xloggc:verbose-jdk8-gc.log -XX:+PrintGCDateStamps 
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=1k

But Now I want that This should also compressed when Rotation is done. So is there any JVM Parameter in JDK 8 for compression of GC Log ? Is there any one who can help me.

Upvotes: 1

Views: 1100

Answers (1)

Jichao Zhang
Jichao Zhang

Reputation: 446

On Linux, you can use logroate: https://linux.die.net/man/8/logrotate to manage the rotation and compression of JVM gc log.

Upvotes: 0

Related Questions