summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-07-17 13:09:47 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2022-07-17 13:09:47 +0200
commit8e4a956604d65b2ca756b57114455e034de6b3d4 (patch)
tree65cd1e4ed0991eba41368585fdf3dfcc12de5f97
parenta68088ef3160d75f02bb6af5f552ca507e51df56 (diff)
downloadprocd-8e4a956604d65b2ca756b57114455e034de6b3d4.tar.gz
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 <ansuelsmth@gmail.com>
-rw-r--r--jail/log.h4
1 files changed, 4 insertions, 0 deletions
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__); \