Add new "trace-cmd agent --verbose" argument for setting the desired log level. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx> --- tracecmd/trace-agent.c | 6 ++++++ tracecmd/trace-usage.c | 1 + 2 files changed, 7 insertions(+) diff --git a/tracecmd/trace-agent.c b/tracecmd/trace-agent.c index 1f7d9461..0dc339b4 100644 --- a/tracecmd/trace-agent.c +++ b/tracecmd/trace-agent.c @@ -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); } diff --git a/tracecmd/trace-usage.c b/tracecmd/trace-usage.c index edc43ba9..7019ab97 100644 --- a/tracecmd/trace-usage.c +++ b/tracecmd/trace-usage.c @@ -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", -- 2.30.2