From 8e4a956604d65b2ca756b57114455e034de6b3d4 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 17 Jul 2022 13:09:47 +0200 Subject: [PATCH] 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 --- jail/log.h | 4 ++++ 1 file changed, 4 insertions(+) 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__); \ -- 2.30.2