mirror of
https://github.com/troglobit/finit.git
synced 2026-11-12 16:51:25 +00:00
New log macro info() for LOG_INFO level logging
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
56a89db889
commit
28a90a793d
1 file changed
+2
@@ -49,12 +49,14 @@ static __attribute__ ((format (printf, 1, 2))) inline void dbg(char *fmt, ...)
|
|||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
#define info(fmt, args...) warnx(fmt, ##args)
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
* General log macros, similar to those used by initctl. Initially intended
|
* General log macros, similar to those used by initctl. Initially intended
|
||||||
* only for bridging client.c in Finit and initctl.
|
* only for bridging client.c in Finit and initctl.
|
||||||
*/
|
*/
|
||||||
#define dbg(fmt, args...) logit(LOG_DEBUG, "%s():" fmt, __func__, ##args)
|
#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 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 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)
|
#define errx(rc, fmt, args...) logit(LOG_ERR, "%s():" fmt, __func__, ##args)
|
||||||
|
|||||||
Reference in new issue
Block a user