X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/c771a55e40d2a41d607a0da1b67cd1f7d546ccc8..431ac6bd7924ab99473c9a621a25ab0c555c3e60:/main.cpp?ds=inline diff --git a/main.cpp b/main.cpp index a3b790d..a4e9fdb 100644 --- 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[])