Browse Source

1

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

1
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}
};

3
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 */

2
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")) {

Loading…
Cancel
Save