@@ -281,6 +281,7 @@ busy:
}
enum {
+ OPT_verbose = 254,
DO_DEBUG = 255
};
@@ -301,6 +302,7 @@ void trace_agent(int argc, char **argv)
{"port", required_argument, NULL, 'p'},
{"help", no_argument, NULL, '?'},
{"debug", no_argument, NULL, DO_DEBUG},
+ {"verbose", required_argument, NULL, OPT_verbose},
{NULL, 0, NULL, 0}
};
@@ -321,6 +323,10 @@ void trace_agent(int argc, char **argv)
case DO_DEBUG:
tracecmd_set_debug(true);
break;
+ case OPT_verbose:
+ if (trace_set_verbose(optarg) < 0)
+ die("invalid verbose level %s", optarg);
+ break;
default:
usage(argv);
}
@@ -303,6 +303,7 @@ static struct usage_help usage_help[] = {
" Creates a vsocket to listen for clients.\n"
" -p port number to listen on.\n"
" -D run in daemon mode.\n"
+ " --verbose 'level' Set the desired log level\n"
},
{
"setup-guest",
Add new "trace-cmd agent --verbose" argument for setting the desired log level. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> --- tracecmd/trace-agent.c | 6 ++++++ tracecmd/trace-usage.c | 1 + 2 files changed, 7 insertions(+)