From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> The tep logs should only print to stderr for WARNINGS and higher. Info messages can go to stdout. Also, only print perror on warnings or higher. Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- src/parse-utils.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/parse-utils.c b/src/parse-utils.c index 3f4918f7468e..09059edf0159 100644 --- a/src/parse-utils.c +++ b/src/parse-utils.c @@ -67,13 +67,17 @@ int __tep_vprint(const char *name, enum tep_loglevel level, bool print_err, const char *fmt, va_list ap) { int ret = errno; - - if (errno && print_err) { - perror(name); - fprintf(stderr, " "); + FILE *fp = stdout; + + if (level <= TEP_LOG_WARNING) { + fp = stderr; + if (errno && print_err) { + perror(name); + fprintf(stderr, " "); + } } - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); + vfprintf(fp, fmt, ap); + fprintf(fp, "\n"); return ret; } -- 2.34.1