< prev index next >

src/share/vm/logging/logConfiguration.cpp

Print this page




 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 }
 406 
 407 void LogConfiguration::describe_current_configuration(outputStream* out){
 408   out->print_cr("Log output configuration:");
 409   for (size_t i = 0; i < _n_outputs; i++) {
 410     out->print("#" SIZE_FORMAT ": %s %s ", i, _outputs[i]->name(), _outputs[i]->config_string());

 411     for (size_t d = 0; d < LogDecorators::Count; d++) {
 412       LogDecorators::Decorator decorator = static_cast<LogDecorators::Decorator>(d);
 413       if (_outputs[i]->decorators().is_decorator(decorator)) {
 414         out->print("%s,", LogDecorators::name(decorator));

 415       }
 416     }
 417     out->cr();
 418   }
 419 }
 420 
 421 void LogConfiguration::describe(outputStream* out) {
 422   describe_available(out);
 423   ConfigurationLock cl;
 424   describe_current_configuration(out);
 425 }
 426 
 427 void LogConfiguration::print_command_line_help(FILE* out) {
 428   jio_fprintf(out, "-Xlog Usage: -Xlog[:[what][:[output][:[decorators][:output-options]]]]\n"
 429               "\t where 'what' is a combination of tags and levels on the form tag1[+tag2...][*][=level][,...]\n"
 430               "\t Unless wildcard (*) is specified, only log messages tagged with exactly the tags specified will be matched.\n\n");
 431 
 432   jio_fprintf(out, "Available log levels:\n");
 433   for (size_t i = 0; i < LogLevel::Count; i++) {
 434     jio_fprintf(out, "%s %s", (i == 0 ? "" : ","), LogLevel::name(static_cast<LogLevelType>(i)));




 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 }
 406 
 407 void LogConfiguration::describe_current_configuration(outputStream* out){
 408   out->print_cr("Log output configuration:");
 409   for (size_t i = 0; i < _n_outputs; i++) {
 410     out->print("#" SIZE_FORMAT ": %s %s ", i, _outputs[i]->name(), _outputs[i]->config_string());
 411     char delimiter[2] = {0};
 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%s", delimiter, LogDecorators::name(decorator));
 416         *delimiter = ',';
 417       }
 418     }
 419     out->cr();
 420   }
 421 }
 422 
 423 void LogConfiguration::describe(outputStream* out) {
 424   describe_available(out);
 425   ConfigurationLock cl;
 426   describe_current_configuration(out);
 427 }
 428 
 429 void LogConfiguration::print_command_line_help(FILE* out) {
 430   jio_fprintf(out, "-Xlog Usage: -Xlog[:[what][:[output][:[decorators][:output-options]]]]\n"
 431               "\t where 'what' is a combination of tags and levels on the form tag1[+tag2...][*][=level][,...]\n"
 432               "\t Unless wildcard (*) is specified, only log messages tagged with exactly the tags specified will be matched.\n\n");
 433 
 434   jio_fprintf(out, "Available log levels:\n");
 435   for (size_t i = 0; i < LogLevel::Count; i++) {
 436     jio_fprintf(out, "%s %s", (i == 0 ? "" : ","), LogLevel::name(static_cast<LogLevelType>(i)));


< prev index next >