From c017ef5ba2cee263fba6ab0e483e4639390782b7 Mon Sep 17 00:00:00 2001 From: alegrand Date: Tue, 7 Dec 2004 18:12:43 +0000 Subject: [PATCH 1/1] Using logs git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@549 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/surf/trace_mgr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/surf/trace_mgr.c b/src/surf/trace_mgr.c index 23dfafcac0..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) { @@ -51,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); -- 2.20.1