8155089: UL: Remove trailing comma from log decoration list

Reviewed-by: dsamersoff, mlarsson
This commit is contained in:
Yasumasa Suenaga 2016-04-27 21:00:45 +09:00
parent 7d20b786fd
commit 10ed386bc7

View File

@ -408,10 +408,12 @@ void LogConfiguration::describe_current_configuration(outputStream* out){
out->print_cr("Log output configuration:"); out->print_cr("Log output configuration:");
for (size_t i = 0; i < _n_outputs; i++) { for (size_t i = 0; i < _n_outputs; i++) {
out->print("#" SIZE_FORMAT ": %s %s ", i, _outputs[i]->name(), _outputs[i]->config_string()); out->print("#" SIZE_FORMAT ": %s %s ", i, _outputs[i]->name(), _outputs[i]->config_string());
char delimiter[2] = {0};
for (size_t d = 0; d < LogDecorators::Count; d++) { for (size_t d = 0; d < LogDecorators::Count; d++) {
LogDecorators::Decorator decorator = static_cast<LogDecorators::Decorator>(d); LogDecorators::Decorator decorator = static_cast<LogDecorators::Decorator>(d);
if (_outputs[i]->decorators().is_decorator(decorator)) { if (_outputs[i]->decorators().is_decorator(decorator)) {
out->print("%s,", LogDecorators::name(decorator)); out->print("%s%s", delimiter, LogDecorators::name(decorator));
*delimiter = ',';
} }
} }
out->cr(); out->cr();