Skip to content

CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit www.eclipse.org/openj9/docs

-Xlog

This option is supported for better compatibility with the reference implementation. However, only forms of -Xlog that enable garbage collection (GC) logging are recognized. Note that the behavior of this option changed in Eclipse OpenJ9™ 0.24.0.

Syntax

    -Xlog[:<parameters>]

Note: In Eclipse OpenJ9 version 0.24.0, the -Xsyslog option replaced the existing OpenJ9 -Xlog option for message logging to avoid conflicts with the reference implementation. For backward compatibility, you can control the behavior of the -Xlog option with the -XX:[+|-]LegacyXlogOption option.

Explanation

Use of the -Xlog option is supported for GC logging only. The following table describes the behavior of the option depending on what you specify on the command line.

-Xlog option type Behavior
An option that returns GC data. For example -Xlog:gc An equivalent OpenJ9 GC logging option is enabled. See the next table for more details.
An option that, in the reference implementation, returns GC data and also other data. For example: -Xlog, -Xlog:all, -Xlog:gc+<other_tag>, or -Xlog:gc:stdout An equivalent OpenJ9 GC logging option is enabled as before but because non-GC data is not supported, the following error message is also produced:
JVMJ9VM007W Command-line option unrecognised: <option>
An option that, in the reference implementation, returns only non-GC data Non-GC data is not supported, so the following error message is produced:
JVMJ9VM007W Command-line option unrecognised: <option>

The following table shows some examples of the mapping between -Xlog parameters and the equivalent OpenJ9 GC parameters:

-Xlog parameter OpenJ9 GC equivalent
-Xlog:gc
-Xlog:gc:stderr
-verbose:gc
-Xlog:gc:<filename>
-Xlog:gc:file=<filename>
-Xverbosegclog:<updated_filename>

In the table, the value of <filename> can contain the following tokens, which are processed and passed to the -Xverbosegclog option as <updated_filename>:

  • %p is replaced with the process ID (equivalent to dump agent token %pid)
  • %t is replaced with the dump agent tokens %Y-%m-%d_%H-%M-%S.

See also