XBT_LOG_NEW_CATEGORY(msg,"All MSG categories");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(log,xbt,"Loggings from the logging mechanism itself");
-void xbt_log_init(int *argc,char **argv, const char *defaultlog) {
+void xbt_log_init(int *argc,char **argv) {
int i,j;
char *opt;
- int found=0;
/* Set logs and init log submodule */
for (i=1; i<*argc; i++) {
!strncmp(argv[i],"--surf-log=",strlen("--surf-log=")) ||
!strncmp(argv[i],"--msg-log=",strlen("--msg-log=")) ||
!strncmp(argv[i],"--xbt-log=",strlen("--xbt-log="))) {
- found = 1;
opt=strchr(argv[i],'=');
opt++;
xbt_log_control_set(opt);
i--; /* compensate effect of next loop incrementation */
}
}
- if (!found && defaultlog) {
- xbt_log_control_set(defaultlog);
- }
}
void xbt_log_exit(void) {
/** @brief Initialize the xbt mechanisms. */
void
xbt_init(int *argc, char **argv) {
- xbt_init_defaultlog(argc, argv, NULL);
-}
-
-/** @brief Initialize the xbt mechanisms. */
-void
-xbt_init_defaultlog(int *argc,char **argv, const char *defaultlog) {
static short int first_run = 1;
if (!first_run)
return;
first_run = 0;
VERB0("Initialize XBT");
- xbt_log_init(argc,argv,defaultlog);
+ xbt_log_init(argc,argv);
}
/** @brief Finalize the xbt mechanisms. */