开发者

how to append gc log

开发者 https://www.devze.com 2023-03-17 14:32 出处:网络
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.

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

精彩评论

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