fprintf(fp, " -P, --path=PATH Set the `path` string parameter of the\n");
fprintf(fp, " current component to PATH\n");
fprintf(fp, " --plugin-path=PATH[:PATH]... Add PATH to the list of paths from which\n");
+ fprintf(fp, " dynamic plugins can be loaded\n");
fprintf(fp, " --retry-duration=DUR When babeltrace2(1) needs to retry to run\n");
fprintf(fp, " the graph later, retry in DUR µs\n");
fprintf(fp, " (default: 100000)\n");
stream_intersection_mode = true;
break;
case OPT_VERBOSE:
- if (*default_log_level != BT_LOG_VERBOSE &&
+ if (*default_log_level != BT_LOG_TRACE &&
*default_log_level != BT_LOG_DEBUG) {
*default_log_level = BT_LOG_INFO;
}
break;
case OPT_DEBUG:
- *default_log_level = BT_LOG_VERBOSE;
+ *default_log_level = BT_LOG_TRACE;
break;
default:
break;
BT_OBJECT_PUT_REF_AND_RESET(cfg);
end:
+ /*
+ * If the log level is still unset at this point, set it to
+ * the program's default.
+ */
+ if (*default_log_level < 0) {
+ *default_log_level = cli_default_log_level;
+ }
+
if (pc) {
poptFreeContext(pc);
}
if (strcmp(cur_arg, "-d") == 0 ||
strcmp(cur_arg, "--debug") == 0) {
- default_log_level = BT_LOG_VERBOSE;
+ default_log_level = BT_LOG_TRACE;
} else if (strcmp(cur_arg, "-v") == 0 ||
strcmp(cur_arg, "--verbose") == 0) {
- if (default_log_level != BT_LOG_VERBOSE &&
+ if (default_log_level != BT_LOG_TRACE &&
default_log_level != BT_LOG_DEBUG) {
/*
* Legacy: do not override a previous
* --debug because --verbose and --debug
* can be specified together (in this
* case we want the lowest log level to
- * apply, VERBOSE).
+ * apply, TRACE).
*/
default_log_level = BT_LOG_INFO;
}
}
if (config) {
- BT_ASSERT(default_log_level >= BT_LOG_VERBOSE);
+ BT_ASSERT(default_log_level >= BT_LOG_TRACE);
config->log_level = default_log_level;
config->command_name = command_name;
}