< prev index next >

src/share/vm/logging/logConfiguration.cpp

Print this page




 389   }
 390   out->cr();
 391 
 392   out->print("Available log decorators:");
 393   for (size_t i = 0; i < LogDecorators::Count; i++) {
 394     LogDecorators::Decorator d = static_cast<LogDecorators::Decorator>(i);
 395     out->print("%s %s (%s)", (i == 0 ? "" : ","), LogDecorators::name(d), LogDecorators::abbreviation(d));
 396   }
 397   out->cr();
 398 
 399   out->print("Available log tags:");
 400   for (size_t i = 1; i < LogTag::Count; i++) {
 401     out->print("%s %s", (i == 1 ? "" : ","), LogTag::name(static_cast<LogTagType>(i)));
 402   }
 403   out->cr();
 404 
 405   ConfigurationLock cl;
 406   out->print_cr("Log output configuration:");
 407   for (size_t i = 0; i < _n_outputs; i++) {
 408     out->print("#" SIZE_FORMAT ": %s %s ", i, _outputs[i]->name(), _outputs[i]->config_string());



 409     for (size_t d = 0; d < LogDecorators::Count; d++) {
 410       LogDecorators::Decorator decorator = static_cast<LogDecorators::Decorator>(d);
 411       if (_outputs[i]->decorators().is_decorator(decorator)) {
 412         out->print("%s,", LogDecorators::name(decorator));
 413       }
 414     }
 415     out->cr();
 416   }
 417 }
 418 
 419 void LogConfiguration::print_command_line_help(FILE* out) {
 420   jio_fprintf(out, "-Xlog Usage: -Xlog[:[what][:[output][:[decorators][:output-options]]]]\n"
 421               "\t where 'what' is a combination of tags and levels on the form tag1[+tag2...][*][=level][,...]\n"
 422               "\t Unless wildcard (*) is specified, only log messages tagged with exactly the tags specified will be matched.\n\n");
 423 
 424   jio_fprintf(out, "Available log levels:\n");
 425   for (size_t i = 0; i < LogLevel::Count; i++) {
 426     jio_fprintf(out, "%s %s", (i == 0 ? "" : ","), LogLevel::name(static_cast<LogLevelType>(i)));
 427   }
 428 




 389   }
 390   out->cr();
 391 
 392   out->print("Available log decorators:");
 393   for (size_t i = 0; i < LogDecorators::Count; i++) {
 394     LogDecorators::Decorator d = static_cast<LogDecorators::Decorator>(i);
 395     out->print("%s %s (%s)", (i == 0 ? "" : ","), LogDecorators::name(d), LogDecorators::abbreviation(d));
 396   }
 397   out->cr();
 398 
 399   out->print("Available log tags:");
 400   for (size_t i = 1; i < LogTag::Count; i++) {
 401     out->print("%s %s", (i == 1 ? "" : ","), LogTag::name(static_cast<LogTagType>(i)));
 402   }
 403   out->cr();
 404 
 405   ConfigurationLock cl;
 406   out->print_cr("Log output configuration:");
 407   for (size_t i = 0; i < _n_outputs; i++) {
 408     out->print("#" SIZE_FORMAT ": %s %s ", i, _outputs[i]->name(), _outputs[i]->config_string());
 409     if (_outputs[i]->option_string() != NULL) {
 410       out->print("%s ", _outputs[i]->option_string());
 411     }
 412     for (size_t d = 0; d < LogDecorators::Count; d++) {
 413       LogDecorators::Decorator decorator = static_cast<LogDecorators::Decorator>(d);
 414       if (_outputs[i]->decorators().is_decorator(decorator)) {
 415         out->print("%s,", LogDecorators::name(decorator));
 416       }
 417     }
 418     out->cr();
 419   }
 420 }
 421 
 422 void LogConfiguration::print_command_line_help(FILE* out) {
 423   jio_fprintf(out, "-Xlog Usage: -Xlog[:[what][:[output][:[decorators][:output-options]]]]\n"
 424               "\t where 'what' is a combination of tags and levels on the form tag1[+tag2...][*][=level][,...]\n"
 425               "\t Unless wildcard (*) is specified, only log messages tagged with exactly the tags specified will be matched.\n\n");
 426 
 427   jio_fprintf(out, "Available log levels:\n");
 428   for (size_t i = 0; i < LogLevel::Count; i++) {
 429     jio_fprintf(out, "%s %s", (i == 0 ? "" : ","), LogLevel::name(static_cast<LogLevelType>(i)));
 430   }
 431 


< prev index next >