Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to kill the singleton design pattern
[simgrid.git] / include / xbt / log.h
index df5cbcb..9c97059 100644 (file)
@@ -87,7 +87,7 @@ typedef enum {
 #endif /* !defined(NLOG) */
 
 /* Transforms a category name to a global variable name. */
-#define _XBT_LOGV(cat)   _XBT_LOG_CONCAT(_simgrid_this_log_category_does_not_exist__, cat)
+#define _XBT_LOGV(cat)   _XBT_LOG_CONCAT(_simgrid_log_category__, cat)
 #define _XBT_LOG_CONCAT(x,y) x ## y
 
 /* The root of the category hierarchy. */
@@ -99,7 +99,7 @@ typedef enum {
  * XBT_LOG_NEW_CATEGORY */
 #define XBT_LOG_NEW_SUBCATEGORY_helper(catName, parent, desc) \
     XBT_EXPORT_NO_IMPORT(s_xbt_log_category_t) _XBT_LOGV(catName) = {       \
-        NULL,                             \
+        &_XBT_LOGV(parent),                             \
         NULL /* firstChild */,                          \
        NULL /* nextSibling */,                         \
         #catName,                                       \