Browse Source

1

nodeinfo-routing-update
jeka 1 week ago
parent
commit
adcebcc31b
  1. 1
      lib/debug_config.c
  2. 3
      lib/debug_config.h
  3. 2
      src/config_parser.c

1
lib/debug_config.c

@ -82,6 +82,7 @@ static debug_category_t get_category_by_name(const char* name) {
{"control", DEBUG_CATEGORY_CONTROL},
{"dump", DEBUG_CATEGORY_DUMP},
{"traffic", DEBUG_CATEGORY_TRAFFIC},
{"debug", DEBUG_CATEGORY_DEBUG},
{"all", DEBUG_CATEGORY_ALL},
{NULL, 0}
};

3
lib/debug_config.h

@ -53,7 +53,8 @@ typedef uint64_t debug_category_t;
#define DEBUG_CATEGORY_CONTROL ((debug_category_t)1 << 14) // Control/monitoring server
#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_COUNT 17 // Total number of categories
#define DEBUG_CATEGORY_DEBUG ((debug_category_t)1 << 17) // Current debugging
#define DEBUG_CATEGORY_COUNT 18 // Total number of categories
#define DEBUG_CATEGORY_ALL ((debug_category_t)0xFFFFFFFFUL)
/* Debug configuration structure */

2
src/config_parser.c

@ -68,6 +68,8 @@ static uint32_t parse_debug_categories(const char *value) {
categories |= DEBUG_CATEGORY_TIMERS;
} else if (strstr(token, "traffic")) {
categories |= DEBUG_CATEGORY_TRAFFIC;
} else if (strstr(token, "debug")) {
categories |= DEBUG_CATEGORY_DEBUG;
} else if (strstr(token, "all")) {
categories |= DEBUG_CATEGORY_ALL;
} else if (strstr(token, "none")) {

Loading…
Cancel
Save