From 3bfd0c5642571f522439eb6942870004c34730bf Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Mon, 29 Feb 2016 14:23:58 +0100 Subject: [PATCH] logging: add alternate log syntax --- src/common/capwap_logging.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/common/capwap_logging.h b/src/common/capwap_logging.h index 9d7f4f1..c4535c1 100644 --- a/src/common/capwap_logging.h +++ b/src/common/capwap_logging.h @@ -2,13 +2,20 @@ #define __CAPWAP_LOGGING_HEADER__ /* Logging level */ -#define CAPWAP_LOGGING_NONE 0 +#define CAPWAP_LOGGING_NONE 0 #define CAPWAP_LOGGING_FATAL 1 #define CAPWAP_LOGGING_ERROR 2 #define CAPWAP_LOGGING_WARNING 3 -#define CAPWAP_LOGGING_INFO 4 +#define CAPWAP_LOGGING_INFO 4 #define CAPWAP_LOGGING_DEBUG 5 +#define LOG_NONE CAPWAP_LOGGING_NONE +#define LOG_FATAL CAPWAP_LOGGING_FATAL +#define LOG_ERROR CAPWAP_LOGGING_ERROR +#define LOG_WARNING CAPWAP_LOGGING_WARNING +#define LOG_INFO CAPWAP_LOGGING_INFO +#define LOG_DEBUG CAPWAP_LOGGING_DEBUG + /* Logging initialize function */ void capwap_logging_init(); void capwap_logging_close(); @@ -30,6 +37,9 @@ void capwap_logging_hexdump(int level, const char *title, const uint8_t *data, s #define capwap_logging_hexdump(l, t, d, len) do { } while (0) #endif +#define log_printf capwap_logging_printf +#define log_hexdump capwap_logging_hexdump + /* */ #define capwap_logging_fatal(f, args...) capwap_logging_printf(CAPWAP_LOGGING_FATAL, f, ##args) #define capwap_logging_error(f, args...) capwap_logging_printf(CAPWAP_LOGGING_ERROR, f, ##args)