From 797eb2f563e8e95887cebee56213f7fd624b66ed Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 28 Mar 2012 16:11:20 +0200 Subject: [PATCH] Initialize categories through XBT_LOG_CONNECT, so that they are correctly listed with --help-log-categories. It's a bit harsh, but I cannot imagine any other way to achieve this. --- include/xbt/log.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/xbt/log.h b/include/xbt/log.h index 699acd1b49..7ff36466b2 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -118,6 +118,7 @@ typedef enum { XBT_LOG_EXTERNAL_CATEGORY(child); \ XBT_LOG_EXTERNAL_CATEGORY(parent_cat); \ _XBT_LOGV(child).parent = &_XBT_LOGV(parent_cat); \ + _xbt_log_cat_init(&_XBT_LOGV(child), xbt_log_priority_uninitialized); \ } else ((void)0) #else # define _XBT_LOG_PARENT_INITIALIZER(parent) &_XBT_LOGV(parent) @@ -126,6 +127,7 @@ typedef enum { XBT_LOG_EXTERNAL_CATEGORY(child); \ XBT_LOG_EXTERNAL_CATEGORY(parent_cat); \ xbt_assert(_XBT_LOGV(child).parent == &_XBT_LOGV(parent_cat)); \ + _xbt_log_cat_init(&_XBT_LOGV(child), xbt_log_priority_uninitialized); \ } else ((void)0) #endif -- 2.20.1