8190346: improve unified JVM logging help message and warnings

Reviewed-by: lfoltan, rehn, hseigel
This commit is contained in:
Marcus Larsson 2018-02-28 09:30:06 +01:00
parent 3b8d9ef239
commit cb275ca384
13 changed files with 267 additions and 86 deletions

View file

@ -3096,7 +3096,8 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
} else if (match_option(option, "-Xlog", &tail)) {
bool ret = false;
if (strcmp(tail, ":help") == 0) {
LogConfiguration::print_command_line_help(defaultStream::output_stream());
fileStream stream(defaultStream::output_stream());
LogConfiguration::print_command_line_help(&stream);
vm_exit(0);
} else if (strcmp(tail, ":disable") == 0) {
LogConfiguration::disable_logging();
@ -3109,7 +3110,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
}
if (ret == false) {
jio_fprintf(defaultStream::error_stream(),
"Invalid -Xlog option '-Xlog%s'\n",
"Invalid -Xlog option '-Xlog%s', see error log for details.\n",
tail);
return JNI_EINVAL;
}