]> AND Private Git Repository - loba.git/blobdiff - main.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Wip++...
[loba.git] / main.cpp
index a3b790d3fef112bd81fdc86f0a285ed6d6401d43..a4e9fdb054c8e476d6f277b77689e6348c68eacb 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -9,8 +9,14 @@
 #include "timer.h"
 #include "version.h"
 
-// Creates a new log category and makes it the default
-XBT_LOG_NEW_DEFAULT_CATEGORY(simu, "Simulation messages");
+// Creates log categories
+XBT_LOG_NEW_CATEGORY(simu, "Simulation messages");
+XBT_LOG_NEW_SUBCATEGORY(main, simu, "Messages from global infrastructure");
+XBT_LOG_NEW_SUBCATEGORY(comm, simu, "Messages from asynchronous pipes");
+XBT_LOG_NEW_SUBCATEGORY(proc, simu, "Messages from base process class");
+XBT_LOG_NEW_SUBCATEGORY(loba, simu, "Messages from load-balancer");
+
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(main);
 
 // Failure exit status
 enum {
@@ -21,10 +27,14 @@ enum {
     EXIT_FAILURE_CLEAN = 0x08,  // error at cleanup
 };
 
+#include "loba_least_loaded.h"
 int simulation_main(int argc, char* argv[])
 {
-    process proc(argc, argv);
-    return proc.run();
+    int result;
+    process* proc = new loba_least_loaded(argc, argv);
+    result = proc->run();
+    delete proc;
+    return result;
 }
 
 int main(int argc, char* argv[])