diff --git a/lib/debug_config.c b/lib/debug_config.c index 20abe2c..4273efd 100644 --- a/lib/debug_config.c +++ b/lib/debug_config.c @@ -83,6 +83,7 @@ static debug_category_t get_category_by_name(const char* name) { {"dump", DEBUG_CATEGORY_DUMP}, {"traffic", DEBUG_CATEGORY_TRAFFIC}, {"debug", DEBUG_CATEGORY_DEBUG}, + {"general", DEBUG_CATEGORY_GENERAL}, {"all", DEBUG_CATEGORY_ALL}, {NULL, 0} }; diff --git a/lib/debug_config.h b/lib/debug_config.h index 9f1643e..da6391a 100644 --- a/lib/debug_config.h +++ b/lib/debug_config.h @@ -54,7 +54,8 @@ typedef uint64_t debug_category_t; #define DEBUG_CATEGORY_DUMP ((debug_category_t)1 << 15) // Packet dump/logging #define DEBUG_CATEGORY_TRAFFIC ((debug_category_t)1 << 16) // Traffic flow (src/dst node IDs) #define DEBUG_CATEGORY_DEBUG ((debug_category_t)1 << 17) // Current debugging -#define DEBUG_CATEGORY_COUNT 18 // Total number of categories +#define DEBUG_CATEGORY_GENERAL ((debug_category_t)1 << 18) // Messages for user (common log) +#define DEBUG_CATEGORY_COUNT 19 // Total number of categories #define DEBUG_CATEGORY_ALL ((debug_category_t)0xFFFFFFFFUL) /* Debug configuration structure */ diff --git a/src/config_parser.c b/src/config_parser.c index fc5d2d3..606c85a 100644 --- a/src/config_parser.c +++ b/src/config_parser.c @@ -70,6 +70,8 @@ static uint32_t parse_debug_categories(const char *value) { categories |= DEBUG_CATEGORY_TRAFFIC; } else if (strstr(token, "debug")) { categories |= DEBUG_CATEGORY_DEBUG; + } else if (strstr(token, "general")) { + categories |= DEBUG_CATEGORY_GENERAL; } else if (strstr(token, "all")) { categories |= DEBUG_CATEGORY_ALL; } else if (strstr(token, "none")) {