[PATCH] libubox: add macros for remaining logging severities

Kritstupas Savickas kristupas.savickas at pm.me
Mon Jun 17 15:38:55 EDT 2019


Signed-off-by: Kritstupas Savickas <kristupas.savickas at pm.me>
---
 ulog.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ulog.h b/ulog.h
index 46d3c77..9892100 100644
--- a/ulog.h
+++ b/ulog.h
@@ -35,9 +35,13 @@ void ulog_threshold(int threshold);
 void ulog(int priority, const char *fmt, ...)
        __attribute__ ((format (printf, 2, 3)));

+#define ULOG_DBG(fmt, ...) ulog(LOG_DEBUG, fmt, ## __VA_ARGS__)
 #define ULOG_INFO(fmt, ...) ulog(LOG_INFO, fmt, ## __VA_ARGS__)
 #define ULOG_NOTE(fmt, ...) ulog(LOG_NOTICE, fmt, ## __VA_ARGS__)
 #define ULOG_WARN(fmt, ...) ulog(LOG_WARNING, fmt, ## __VA_ARGS__)
 #define ULOG_ERR(fmt, ...) ulog(LOG_ERR, fmt, ## __VA_ARGS__)
+#define ULOG_CRIT(fmt, ...) ulog(LOG_CRIT, fmt, ## __VA_ARGS__)
+#define ULOG_ALERT(fmt, ...) ulog(LOG_ALERT, fmt, ## __VA_ARGS__)
+#define ULOG_EMERG(fmt, ...) ulog(LOG_EMERG, fmt, ## __VA_ARGS__)

 #endif
--
2.22.0



--===============1519926826741639781==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

--===============1519926826741639781==--



More information about the openwrt-devel mailing list