X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/24b8008bb424160e633b1374f54dcd89bdcb9749..0623786fda92bed93596f8de80575ab2db7385f2:/src/surf/trace_mgr.c diff --git a/src/surf/trace_mgr.c b/src/surf/trace_mgr.c index c7a78a0c66..a518fb8479 100644 --- a/src/surf/trace_mgr.c +++ b/src/surf/trace_mgr.c @@ -9,6 +9,9 @@ #include "trace_mgr_private.h" #include +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(trace, surf, + "Logging specific to the SURF trace module"); + static xbt_dict_t trace_list = NULL; static void _tmgr_trace_free(void *trace) { @@ -38,8 +41,6 @@ tmgr_trace_t tmgr_trace_new(const char *filename) FILE *f = NULL; int linecount = 0; char line[256]; - xbt_heap_float_t current_time = 0.0, previous_time = 0.0; - xbt_maxmin_float_t value = -1.0; xbt_heap_float_t periodicity = -1.0; /* No periodicity by default */ s_tmgr_event_t event; tmgr_event_t last_event = NULL; @@ -53,8 +54,7 @@ tmgr_trace_t tmgr_trace_new(const char *filename) /* Parsing et création de la trace */ if ((f = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Cannot open file '%s'\n", filename); - return NULL; + CRITICAL1("Cannot open file '%s'\n", filename); } trace = xbt_new0(s_tmgr_trace_t, 1);