On Wed, 28 Apr 2021 10:30:00 +0300 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > @@ -24,11 +24,11 @@ void tep_set_loglevel(enum tep_loglevel level) > log_level = level; > } > > -int __weak tep_vwarning(const char *name, const char *fmt, va_list ap) > +int __weak tep_vprint(const char *name, enum tep_loglevel level, const char *fmt, va_list ap) > { > int ret = errno; > > - if (errno) > + if (errno && level <= TEP_LOG_WARNING) > perror(name); > > fprintf(stderr, " "); If this is passing in a log level, why not just have: if (level < loglevel) return 0; ? -- Steve