From: Arnaud Giersch Date: Wed, 28 Mar 2012 14:11:20 +0000 (+0200) Subject: Initialize categories through XBT_LOG_CONNECT, X-Git-Tag: v3_7~171 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/797eb2f563e8e95887cebee56213f7fd624b66ed?hp=8b3725a627116bd2a79bcd4d83ae1ebcc8e4be22 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. --- 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