diff mbox series

[v2,5/6] trace-cmd report: Set the log level with -V and -q options

Message ID 20210517134005.611251-6-tz.stoyanov@gmail.com (mailing list archive)
State Accepted
Commit e0d89f568fffcfd36de27034220bbd7bf245fcdd
Headers show
Series Changes to trace-cmd logs | expand

Commit Message

Tzvetomir Stoyanov (VMware) May 17, 2021, 1:40 p.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 b315283e..0cf6e773 100644
--- a/tracecmd/trace-read.c
+++ b/tracecmd/trace-read.c
@@ -1703,9 +1703,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);