Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Getting rid of useless field
[simgrid.git] / src / xbt / module.c
index aa5a0bb..69b1db4 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
-#include "xbt/error.h"
 #include "xbt/dynar.h"
 #include "xbt/config.h"
 
@@ -19,6 +18,8 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(module,xbt, "module handling");
 
+char *xbt_binary_name=NULL; /* Mandatory to retrieve neat backtraces */
+
 struct xbt_module_ {
   xbt_dynar_t *deps;
   xbt_cfg_t *cfg;
@@ -27,26 +28,21 @@ struct xbt_module_ {
   xbt_module_finalize_fct_t finalize;
 };
 
-/** @brief Initialize the xbt mecanisms. */
+/** @brief Initialize the xbt mechanisms. */
 void 
 xbt_init(int *argc, char **argv) {
-  xbt_init_defaultlog(argc, argv, NULL);
-}
-
-/** @brief Initialize the xbt mecanisms. */
-void
-xbt_init_defaultlog(int *argc,char **argv, const char *defaultlog) {
   static short int first_run = 1;
   if (!first_run)
     return;
-  
+
+  xbt_binary_name = strdup(argv[0]);
   first_run = 0;
-  INFO0("Initialize XBT");
+  VERB0("Initialize XBT");
   
-  xbt_log_init(argc,argv,defaultlog);
+  xbt_log_init(argc,argv);
 }
 
-/** @brief Finalize the xbt mecanisms. */
+/** @brief Finalize the xbt mechanisms. */
 void 
 xbt_exit(){
   xbt_log_exit();