Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Connect categories before parsing the command line.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 29 Mar 2012 15:35:04 +0000 (17:35 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 30 Mar 2012 10:01:04 +0000 (12:01 +0200)
src/xbt/log.c

index d268459..eb1f4f7 100644 (file)
@@ -719,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="))) {
@@ -739,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();