-
Bug
-
Resolution: Fixed
-
Major
-
None
-
-
support-core:1130.vb_eef6015fc37
Noticed recently that the rotated GC logs are not collected with JDK 11 when using the filecount / filesize options, only for %t / %p options. For example:
-Xlog:gc\*=info,heap=debug,ref\*=debug,ergo\*=trace,age\*=trace:file=$JENKINS_HOME/.jvm/gc.log:time,level,tags:filecount=5,filesize=40M
When using file=filename, specifying %p and/or %t in the file name expands to the JVM's PID and startup timestamp, respectively. You can also configure text files to handle file rotation based on file size and a number of files to rotate. For example, to rotate the log file every 10 MB and keep 5 files in rotation, specify the options filesize=10M, filecount=5. The target size of the files isn’t guaranteed to be exact, it’s just an approximate value. Files are rotated by default with up to 5 rotated files of target size 20 MB, unless configured otherwise. Specifying filecount=0 means that the log file shouldn’t be rotated. There’s a possibility of the pre-existing log file getting overwritten.
So with JDK 11, logs are rotated if there is no filecount=0 OR if %[pt] are in use.
- links to