- /** Set logs and init log submodule */
- for (i=1; i<*argc; i++) {
- if (!strncmp(argv[i],"--gras-log=",strlen("--gras-log="))) {
- found = 1;
- opt=strchr(argv[i],'=');
- opt++;
- xbt_log_control_set(opt);
- DEBUG1("Did apply '%s' as log setting",opt);
- /*remove this from argv*/
- for (j=i+1; j<*argc; j++) {
- argv[j-1] = argv[j];
- }
- argv[j-1] = NULL;
- (*argc)--;
- i--; /* compensate effect of next loop incrementation */
- }
- }
- if (!found && defaultlog) {
- xbt_log_control_set(defaultlog);
- }
-
- gras_process_init(); /* calls procdata_init, which calls dynar_new */
- /** init other submodules */
- if (xbt_running_process++ == 0) {
- gras_msg_init();
- gras_trp_init();
- gras_datadesc_init();
- }
+ first_run = 0;
+ VERB0("Initialize XBT");
+
+ xbt_log_init(argc,argv,defaultlog);