8265047: Inconsistent warning message in jcmd VM.log
Reviewed-by: dholmes, stuefe, sspitsyn
This commit is contained in:
parent
ea30bd6684
commit
51f5adfca3
@ -427,6 +427,7 @@ bool LogConfiguration::parse_log_arguments(const char* outputstr,
|
|||||||
|
|
||||||
ConfigurationLock cl;
|
ConfigurationLock cl;
|
||||||
size_t idx;
|
size_t idx;
|
||||||
|
bool added = false;
|
||||||
if (outputstr[0] == '#') { // Output specified using index
|
if (outputstr[0] == '#') { // Output specified using index
|
||||||
int ret = sscanf(outputstr + 1, SIZE_FORMAT, &idx);
|
int ret = sscanf(outputstr + 1, SIZE_FORMAT, &idx);
|
||||||
if (ret != 1 || idx >= _n_outputs) {
|
if (ret != 1 || idx >= _n_outputs) {
|
||||||
@ -447,9 +448,8 @@ bool LogConfiguration::parse_log_arguments(const char* outputstr,
|
|||||||
LogOutput* output = new_output(normalized, output_options, errstream);
|
LogOutput* output = new_output(normalized, output_options, errstream);
|
||||||
if (output != NULL) {
|
if (output != NULL) {
|
||||||
idx = add_output(output);
|
idx = add_output(output);
|
||||||
|
added = true;
|
||||||
}
|
}
|
||||||
} else if (output_options != NULL && strlen(output_options) > 0) {
|
|
||||||
errstream->print_cr("Output options for existing outputs are ignored.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FREE_C_HEAP_ARRAY(char, normalized);
|
FREE_C_HEAP_ARRAY(char, normalized);
|
||||||
@ -457,6 +457,9 @@ bool LogConfiguration::parse_log_arguments(const char* outputstr,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!added && output_options != NULL && strlen(output_options) > 0) {
|
||||||
|
errstream->print_cr("Output options for existing outputs are ignored.");
|
||||||
|
}
|
||||||
configure_output(idx, selections, decorators);
|
configure_output(idx, selections, decorators);
|
||||||
notify_update_listeners();
|
notify_update_listeners();
|
||||||
selections.verify_selections(errstream);
|
selections.verify_selections(errstream);
|
||||||
|
Loading…
Reference in New Issue
Block a user