diff mbox series

[1/8] trace-cmd library: Use tep_vprint() for logs

Message ID 20210428074149.757163-2-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
The traceevent library funciton for printing logs is changed from
tep_vwarning to tep_vprint.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 lib/trace-cmd/trace-util.c | 5 +++--
 python/ctracecmd.i         | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/lib/trace-cmd/trace-util.c b/lib/trace-cmd/trace-util.c
index 2d3bc741..4228b055 100644
--- a/lib/trace-cmd/trace-util.c
+++ b/lib/trace-cmd/trace-util.c
@@ -20,6 +20,7 @@ 
 #include <sys/stat.h>
 #include <sys/sysinfo.h>
 #include <time.h>
+#include <traceevent/event-parse.h>
 #include <traceevent/event-utils.h>
 
 #include "trace-cmd-private.h"
@@ -359,7 +360,7 @@  void __weak tracecmd_warning(const char *fmt, ...)
 	va_list ap;
 
 	va_start(ap, fmt);
-	tep_vwarning("libtracecmd", fmt, ap);
+	tep_vprint("libtracecmd", TEP_LOG_WARNING, fmt, ap);
 	va_end(ap);
 }
 
@@ -369,7 +370,7 @@  void __weak tracecmd_fatal(const char *fmt, ...)
 	va_list ap;
 
 	va_start(ap, fmt);
-	ret = tep_vwarning("libtracecmd", fmt, ap);
+	ret = tep_vprint("libtracecmd", TEP_LOG_CRITICAL, fmt, ap);
 	va_end(ap);
 
 	if (debug) {
diff --git a/python/ctracecmd.i b/python/ctracecmd.i
index e938c780..fa942215 100644
--- a/python/ctracecmd.i
+++ b/python/ctracecmd.i
@@ -63,7 +63,7 @@  void warning(const char *fmt, ...)
 		return;
 
 	va_start(ap, fmt);
-	tep_vwarning("tracecmd", fmt, ap);
+	tep_vprint("tracecmd", TEP_LOG_WARNING, fmt, ap);
 	va_end(ap);
 }