Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Connect categories before parsing the command line.
[simgrid.git] / src / xbt / log.c
index d3166af..eb1f4f7 100644 (file)
@@ -647,9 +647,11 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(msg_process, msg);
   XBT_LOG_CONNECT(msg_task, msg);
 
-  /* sd */
+  /* simdag */
   XBT_LOG_CONNECT(sd_daxparse, sd);
+#ifdef HAVE_GRAPHVIZ
   XBT_LOG_CONNECT(sd_dotparse, sd);
+#endif
   XBT_LOG_CONNECT(sd_kernel, sd);
   XBT_LOG_CONNECT(sd_task, sd);
   XBT_LOG_CONNECT(sd_workstation, sd);
@@ -717,6 +719,8 @@ void xbt_log_init(int *argc, char **argv)
 
   //    _XBT_LOGV(log).threshold = xbt_log_priority_debug; /* uncomment to set the LOG category to debug directly */
 
+  xbt_log_connect_categories();
+
   /* Set logs and init log submodule */
   for (j = i = 1; i < *argc; i++) {
     if (!strncmp(argv[i], "--log=", strlen("--log="))) {
@@ -737,8 +741,6 @@ void xbt_log_init(int *argc, char **argv)
     *argc = j;
   }
 
-  xbt_log_connect_categories();
-
   if (help_requested) {
     if (help_requested & 1)
       xbt_log_help();