JDK-6836816 : Allow the file specified in the -Xloggc: option to be appended to
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6u10
  • Priority: P5
  • Status: Closed
  • Resolution: Won't Fix
  • OS: linux
  • CPU: x86
  • Submitted: 2009-05-04
  • Updated: 2014-03-12
  • Resolved: 2014-03-12
Related Reports
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
The -Xloggc:<file> option provides no way to specify that you would like the given file to be appended to.


JUSTIFICATION :
We have a long running process for which we would like to record the GC status.  We would like to run logrotate on the file specified in the -Xloggc:<file> option.  We would also like logrotate to truncate the file.  Currently since the file is not being appended to, truncating the file results in nulls being written to in the beginning of the file.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Provide an option to append.
ACTUAL -
The file is never appended to.

Comments
changeset: 5248:621eda7235d2 parent: 5245:4472884d8b37 user: minqi date: Mon Sep 16 15:35:04 2013 -0700 summary: 7164841: Improvements to the GC log file rotation changeset: 2529:2a241e764894 parent: 2527:ae5b2f1dcf12 user: minqi date: Fri Jun 10 15:08:36 2011 -0700 summary: 6941923: RFE: Handling large log files produced by long running Java Applications
12-03-2014

We're not going to add an option to append to the specified file, you can always use cat to concat the files outside of Java. Rotating gc log files is already implemented. Closing as WNF.
12-03-2014