summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/zlog.c13
-rw-r--r--lib/zlog.h2
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/zlog.c b/lib/zlog.c
index ffca572609..ce63227a5c 100644
--- a/lib/zlog.c
+++ b/lib/zlog.c
@@ -685,8 +685,17 @@ static void zlog_backtrace_msg(const struct xref_logmsg *xref, int prio)
tc->xref->xref.line);
}
-void vzlogx(const struct xref_logmsg *xref, int prio,
- const char *fmt, va_list ap)
+PRINTFRR(2, 3)
+void ezlog(int prio, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vzlog(prio, fmt, ap);
+ va_end(ap);
+}
+
+void vzlogx(const struct xref_logmsg *xref, int prio, const char *fmt, va_list ap)
{
struct zlog_tls *zlog_tls = zlog_tls_get();
diff --git a/lib/zlog.h b/lib/zlog.h
index 9d93979957..d19acef5c7 100644
--- a/lib/zlog.h
+++ b/lib/zlog.h
@@ -64,6 +64,8 @@ extern void vzlogx(const struct xref_logmsg *xref, int prio, const char *fmt,
va_list ap) PRINTFRR(3, 0);
#define vzlog(prio, ...) vzlogx(NULL, prio, __VA_ARGS__)
+extern void ezlog(int prio, const char *fmt, ...) PRINTFRR(2, 3);
+
PRINTFRR(2, 3)
static inline void zlog(int prio, const char *fmt, ...)
{