From: Christian Marangi Date: Sun, 17 Jul 2022 11:09:47 +0000 (+0200) Subject: jail: add WARNING macro to log non critical warning message X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8e4a956604d65b2ca756b57114455e034de6b3d4;p=project%2Fprocd.git jail: add WARNING macro to log non critical warning message Add an additional WARNING macro to log non critical warning message. Signed-off-by: Christian Marangi --- diff --git a/jail/log.h b/jail/log.h index 74a9f11..a1091d4 100644 --- a/jail/log.h +++ b/jail/log.h @@ -20,6 +20,10 @@ extern int debug; #define INFO(fmt, ...) do { \ printf("jail: "fmt, ## __VA_ARGS__); \ } while (0) +#define WARNING(fmt, ...) do { \ + syslog(LOG_WARNING, "jail: "fmt, ## __VA_ARGS__); \ + printf("jail: "fmt, ## __VA_ARGS__); \ + } while (0) #define ERROR(fmt, ...) do { \ syslog(LOG_ERR, "jail: "fmt, ## __VA_ARGS__); \ fprintf(stderr,"jail: "fmt, ## __VA_ARGS__); \