开发者

how to append gc log

below is gc logging option to write the specific file

-verbose:gc
-Xloggc:/logs/gc.log

OK. Good. but when java app is restarted, old gc log contents in the file disappeared. I hope vm to append gc log to "/logs/gc.log" file.

does option for this exist? or i have to write she开发者_如何学JAVAll script to back up old gc file?


You are explicitly requesting that the gc data goes to a file named 'gc.log'. You can append the date & pid to the filename to prevent this sort of collision. No mechanism within Hotspot exists to prevent the data from being overwritten.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜