diff mbox series

[7/8] trace-cmd report: Set the log level with -V and -q options

Message ID 20210428074149.757163-8-tz.stoyanov@gmail.com (mailing list archive)
State Superseded
Headers show
Series Changes to trace-cmd logs | expand

Commit Message

Tzvetomir Stoyanov (VMware) April 28, 2021, 7:41 a.m. UTC
When "trace-cmd report -V" is specified, set the log level to INFO.
When "trace-cmd report -q" is specified, set the log level to NONE.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 tracecmd/trace-read.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/tracecmd/trace-read.c b/tracecmd/trace-read.c
index d962b671..aad57dae 100644
--- a/tracecmd/trace-read.c
+++ b/tracecmd/trace-read.c
@@ -1679,9 +1679,11 @@  void trace_report (int argc, char **argv)
 			break;
 		case 'V':
 			show_status = 1;
+			tracecmd_set_loglevel(TEP_LOG_INFO);
 			break;
 		case 'q':
 			silence_warnings = 1;
+			tracecmd_set_loglevel(TEP_LOG_NONE);
 			break;
 		case OPT_cpu:
 			parse_cpulist(optarg);