398
399 out->print("Available log decorators:");
400 for (size_t i = 0; i < LogDecorators::Count; i++) {
401 LogDecorators::Decorator d = static_cast<LogDecorators::Decorator>(i);
402 out->print("%s %s (%s)", (i == 0 ? "" : ","), LogDecorators::name(d), LogDecorators::abbreviation(d));
403 }
404 out->cr();
405
406 out->print("Available log tags:");
407 for (size_t i = 1; i < LogTag::Count; i++) {
408 out->print("%s %s", (i == 1 ? "" : ","), LogTag::name(static_cast<LogTagType>(i)));
409 }
410 out->cr();
411
412 LogTagSet::describe_tagsets(out);
413 }
414
415 void LogConfiguration::describe_current_configuration(outputStream* out){
416 out->print_cr("Log output configuration:");
417 for (size_t i = 0; i < _n_outputs; i++) {
418 out->print("#" SIZE_FORMAT ": %s ", i, _outputs[i]->name());
419 out->print_raw(_outputs[i]->config_string());
420 out->print(" ");
421 char delimiter[2] = {0};
422 for (size_t d = 0; d < LogDecorators::Count; d++) {
423 LogDecorators::Decorator decorator = static_cast<LogDecorators::Decorator>(d);
424 if (_outputs[i]->decorators().is_decorator(decorator)) {
425 out->print("%s%s", delimiter, LogDecorators::name(decorator));
426 *delimiter = ',';
427 }
428 }
429 out->cr();
430 }
431 }
432
433 void LogConfiguration::describe(outputStream* out) {
434 describe_available(out);
435 ConfigurationLock cl;
436 describe_current_configuration(out);
437 }
438
439 void LogConfiguration::print_command_line_help(FILE* out) {
440 jio_fprintf(out, "-Xlog Usage: -Xlog[:[what][:[output][:[decorators][:output-options]]]]\n"
441 "\t where 'what' is a combination of tags and levels on the form tag1[+tag2...][*][=level][,...]\n"
442 "\t Unless wildcard (*) is specified, only log messages tagged with exactly the tags specified will be matched.\n\n");
443
444 jio_fprintf(out, "Available log levels:\n");
445 for (size_t i = 0; i < LogLevel::Count; i++) {
446 jio_fprintf(out, "%s %s", (i == 0 ? "" : ","), LogLevel::name(static_cast<LogLevelType>(i)));
447 }
448
|
398
399 out->print("Available log decorators:");
400 for (size_t i = 0; i < LogDecorators::Count; i++) {
401 LogDecorators::Decorator d = static_cast<LogDecorators::Decorator>(i);
402 out->print("%s %s (%s)", (i == 0 ? "" : ","), LogDecorators::name(d), LogDecorators::abbreviation(d));
403 }
404 out->cr();
405
406 out->print("Available log tags:");
407 for (size_t i = 1; i < LogTag::Count; i++) {
408 out->print("%s %s", (i == 1 ? "" : ","), LogTag::name(static_cast<LogTagType>(i)));
409 }
410 out->cr();
411
412 LogTagSet::describe_tagsets(out);
413 }
414
415 void LogConfiguration::describe_current_configuration(outputStream* out){
416 out->print_cr("Log output configuration:");
417 for (size_t i = 0; i < _n_outputs; i++) {
418 _outputs[i]->describe(out, i);
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)));
437 }
438
|