我正在运行带有测量垃圾收集器行为-verbose:gc
的选项的java ,但它将信息发送到,与我的程序的正常输出混合。我如何告诉它将此信息输出到?stdout
stderr
1 回答
在 HP-UX 上 -Xverbosegc [:help] | [0 | 1] [:文件= [标准输出| 标准错误 | ]]
IBMs JDK任何使用 IBM JDK 的平台
-Xverbosegclog[:[,,]]
Sun JDK -Xloggc:file Report on each garbage collection event, as with -verbose:gc, but log this data to file. In addition to the information -verbose:gc gives, each reported event will be preceeded by the time (in seconds) since the first garbage-collection event. Always use a local file system for storage of this file to avoid stalling the JVM due to network latency. The file may be truncated in the case of a full file system and logging will continue on the truncated file. This option overrides -verbose:gc if both are given on the command line.