#include "timeval.h"
#include "unixctl.h"
#include "util.h"
-#include "vlog.h"
+#include "openvswitch/vlog.h"
static void usage(void);
static const char *parse_command_line(int argc, char *argv[]);
Targets:\n\
-t, --target=TARGET pidfile or socket to contact\n\
Common commands:\n\
- help List commands supported by the target\n\
+ list-commands List commands supported by the target\n\
version Print version of the target\n\
vlog/list List current logging levels\n\
+ vlog/list-pattern List logging patterns for each destination.\n\
vlog/set [SPEC]\n\
Set log levels as detailed in SPEC, which may include:\n\
A valid module name (all modules, by default)\n\
- 'syslog', 'console', 'file' (all facilities, by default))\n\
+ 'syslog', 'console', 'file' (all destinations, by default))\n\
'off', 'emer', 'err', 'warn', 'info', or 'dbg' ('dbg', bydefault)\n\
vlog/reopen Make the program reopen its log file\n\
Other options:\n\
parse_command_line(int argc, char *argv[])
{
enum {
+ OPT_START = UCHAR_MAX + 1,
VLOG_OPTION_ENUMS
};
static const struct option long_options[] = {
{"target", required_argument, NULL, 't'},
{"execute", no_argument, NULL, 'e'},
{"help", no_argument, NULL, 'h'},
+ {"option", no_argument, NULL, 'o'},
{"version", no_argument, NULL, 'V'},
{"timeout", required_argument, NULL, 'T'},
VLOG_LONG_OPTIONS,
{NULL, 0, NULL, 0},
};
- char *short_options_ = long_options_to_short_options(long_options);
+ char *short_options_ = ovs_cmdl_long_options_to_short_options(long_options);
char *short_options = xasprintf("+%s", short_options_);
const char *target;
int e_options;
usage();
break;
+ case 'o':
+ ovs_cmdl_print_options(long_options);
+ exit(EXIT_SUCCESS);
+
case 'T':
time_alarm(atoi(optarg));
break;