Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我通过以下参数强制 jboss 写入 gc 日志:-verbose:gc -Xloggc:gc.log –XX:+PrintGCDetails -XX:+PrintGCDateStamps。每次 jboss 重启后 gc.log 文件都会被覆盖。如何保存所有日志文件?
这些选项可以帮助:
-XX:+UseGCLogFileRotation(启用gc日志轮换)
-XX:GCLogFileSize=100m(gc日志文件的最大大小)
-XX:NumberOfGCLogFiles=10(要保留的 gc 日志文件数)