From 28a90a793d529797e5a4d8b9e28c884cef97f72d Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 27 Feb 2023 22:55:11 +0100 Subject: [PATCH] New log macro info() for LOG_INFO level logging Signed-off-by: Joachim Wiberg --- src/log.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/log.h b/src/log.h index b13b2728..79bf364f 100644 --- a/src/log.h +++ b/src/log.h @@ -49,12 +49,14 @@ static __attribute__ ((format (printf, 1, 2))) inline void dbg(char *fmt, ...) vfprintf(stderr, fmt, ap); va_end(ap); } +#define info(fmt, args...) warnx(fmt, ##args) #else /* * General log macros, similar to those used by initctl. Initially intended * only for bridging client.c in Finit and initctl. */ #define dbg(fmt, args...) logit(LOG_DEBUG, "%s():" fmt, __func__, ##args) +#define info(fmt, args...) logit(LOG_INFO, "%s():" fmt, __func__, ##args) #define warnx(fmt, args...) logit(LOG_WARNING, "%s():" fmt, __func__, ##args) #define warn(fmt, args...) logit(LOG_WARNING, "%s():" fmt ": %s", __func__, ##args, strerror(errno)) #define errx(rc, fmt, args...) logit(LOG_ERR, "%s():" fmt, __func__, ##args)