]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: add extern available variadic zlog function
authorChristian Hopps <chopps@labn.net>
Sat, 25 Jan 2025 06:39:08 +0000 (06:39 +0000)
committerChristian Hopps <chopps@labn.net>
Mon, 3 Mar 2025 11:44:00 +0000 (11:44 +0000)
Signed-off-by: Christian Hopps <chopps@labn.net>
lib/zlog.c
lib/zlog.h

index ffca5726095be9149aeb5e573e1b1a4864818f7c..ce63227a5cf3755851c15b4f15ac9ccebab07a26 100644 (file)
@@ -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();
 
index 9d9397995778e3372de6069285922f19a52c899d..d19acef5c78c759121c9475c051bd86e4d08782d 100644 (file)
@@ -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, ...)
 {