RFR: 8257872: UL: -Xlog does not check number of options

David Holmes dholmes at openjdk.java.net
Tue Dec 8 06:16:14 UTC 2020


On Tue, 8 Dec 2020 03:02:03 GMT, Koichi Sakata <ksakata at openjdk.org> wrote:

> In Unified Logging options can be specified up to four (`-Xlog[:[selections][:[output][:[decorators][:output-options]]]]`).
> But it’s possible to specify options with more colons like `java -Xlog:::::`.
> It’s better to show a message when more options are specified than maximum number.
> 
> By this PR a warning message is outputted when options are specified more than the max number.

src/hotspot/share/logging/logConfiguration.cpp line 371:

> 369: 
> 370:   if (str != NULL) {
> 371:     log_warning(logging)("Options are specified more than the max number in -Xlog.");

Might I suggest:
`log_warning(logging)("Ignoring excess -Xlog options: "%s"", str);`

-------------

PR: https://git.openjdk.java.net/jdk/pull/1685


More information about the hotspot-runtime-dev mailing list