A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove an empty file
[simgrid.git]
/
src
/
xbt
/
log.c
diff --git
a/src/xbt/log.c
b/src/xbt/log.c
index
c8659e0
..
0323fde
100644
(file)
--- a/
src/xbt/log.c
+++ b/
src/xbt/log.c
@@
-41,7
+41,9
@@
typedef struct {
e_xbt_log_priority_t thresh;
int additivity;
xbt_log_appender_t appender;
e_xbt_log_priority_t thresh;
int additivity;
xbt_log_appender_t appender;
-} s_xbt_log_setting_t, *xbt_log_setting_t;
+} s_xbt_log_setting_t;
+
+typedef s_xbt_log_setting_t* xbt_log_setting_t;
static xbt_dynar_t xbt_log_settings = NULL;
static xbt_dynar_t xbt_log_settings = NULL;
@@
-100,7
+102,6
@@
static void xbt_log_connect_categories(void)
XBT_LOG_CONNECT(log);
XBT_LOG_CONNECT(module);
XBT_LOG_CONNECT(replay);
XBT_LOG_CONNECT(log);
XBT_LOG_CONNECT(module);
XBT_LOG_CONNECT(replay);
- XBT_LOG_CONNECT(strbuff);
XBT_LOG_CONNECT(xbt_cfg);
XBT_LOG_CONNECT(xbt_dict);
XBT_LOG_CONNECT(xbt_dict_cursor);
XBT_LOG_CONNECT(xbt_cfg);
XBT_LOG_CONNECT(xbt_dict);
XBT_LOG_CONNECT(xbt_dict_cursor);
@@
-113,7
+114,6
@@
static void xbt_log_connect_categories(void)
XBT_LOG_CONNECT(xbt_heap);
XBT_LOG_CONNECT(xbt_lib);
XBT_LOG_CONNECT(xbt_mallocator);
XBT_LOG_CONNECT(xbt_heap);
XBT_LOG_CONNECT(xbt_lib);
XBT_LOG_CONNECT(xbt_mallocator);
- XBT_LOG_CONNECT(xbt_matrix);
XBT_LOG_CONNECT(xbt_memory_map);
XBT_LOG_CONNECT(xbt_parmap);
XBT_LOG_CONNECT(xbt_sync);
XBT_LOG_CONNECT(xbt_memory_map);
XBT_LOG_CONNECT(xbt_parmap);
XBT_LOG_CONNECT(xbt_sync);
@@
-123,7
+123,7
@@
static void xbt_log_connect_categories(void)
/* The following categories are only defined in libsimgrid */
/* bindings */
/* The following categories are only defined in libsimgrid */
/* bindings */
-#if HAVE_LUA
+#if
SIMGRID_
HAVE_LUA
XBT_LOG_CONNECT(lua);
XBT_LOG_CONNECT(lua_host);
XBT_LOG_CONNECT(lua_platf);
XBT_LOG_CONNECT(lua);
XBT_LOG_CONNECT(lua_host);
XBT_LOG_CONNECT(lua_platf);
@@
-144,17
+144,15
@@
static void xbt_log_connect_categories(void)
XBT_LOG_CONNECT(instr_resource);
XBT_LOG_CONNECT(instr_routing);
XBT_LOG_CONNECT(instr_surf);
XBT_LOG_CONNECT(instr_resource);
XBT_LOG_CONNECT(instr_routing);
XBT_LOG_CONNECT(instr_surf);
- XBT_LOG_CONNECT(instr_trace);
- XBT_LOG_CONNECT(instr_TI_trace);
/* jedule */
/* jedule */
-#if HAVE_JEDULE
+#if
SIMGRID_
HAVE_JEDULE
XBT_LOG_CONNECT(jedule);
XBT_LOG_CONNECT(jed_sd);
#endif
/* mc */
XBT_LOG_CONNECT(jedule);
XBT_LOG_CONNECT(jed_sd);
#endif
/* mc */
-#if HAVE_MC
+#if
SIMGRID_
HAVE_MC
XBT_LOG_CONNECT(mc);
XBT_LOG_CONNECT(mc_checkpoint);
XBT_LOG_CONNECT(mc_comm_determinism);
XBT_LOG_CONNECT(mc);
XBT_LOG_CONNECT(mc_checkpoint);
XBT_LOG_CONNECT(mc_comm_determinism);
@@
-243,7
+241,7
@@
static void xbt_log_connect_categories(void)
XBT_LOG_CONNECT(surf_lagrange_dichotomy);
XBT_LOG_CONNECT(surf_maxmin);
XBT_LOG_CONNECT(surf_network);
XBT_LOG_CONNECT(surf_lagrange_dichotomy);
XBT_LOG_CONNECT(surf_maxmin);
XBT_LOG_CONNECT(surf_network);
-#if HAVE_NS3
+#if
SIMGRID_
HAVE_NS3
XBT_LOG_CONNECT(ns3);
#endif
XBT_LOG_CONNECT(surf_parse);
XBT_LOG_CONNECT(ns3);
#endif
XBT_LOG_CONNECT(surf_parse);
@@
-600,13
+598,12
@@
static xbt_log_setting_t _xbt_log_parse_setting(const char *control_string)
control_string += strspn(control_string, " ");
const char *name = control_string;
control_string += strspn(control_string, " ");
const char *name = control_string;
- control_string += strcspn(control_string, ".= ");
+ control_string += strcspn(control_string, ".
:
= ");
const char *dot = control_string;
control_string += strcspn(control_string, ":= ");
const char *eq = control_string;
const char *dot = control_string;
control_string += strcspn(control_string, ":= ");
const char *eq = control_string;
- if(*dot != '.' && (*eq == '=' || *eq == ':'))
- xbt_die ("Invalid control string '%s'", orig_control_string);
+ xbt_assert(*dot == '.' || (*eq != '=' && *eq != ':'), "Invalid control string '%s'", orig_control_string);
if (!strncmp(dot + 1, "threshold", (size_t) (eq - dot - 1))) {
int i;
if (!strncmp(dot + 1, "threshold", (size_t) (eq - dot - 1))) {
int i;
@@
-676,7
+673,7
@@
static xbt_log_setting_t _xbt_log_parse_setting(const char *control_string)
} else {
char buff[512];
snprintf(buff, MIN(512, eq - dot), "%s", dot + 1);
} else {
char buff[512];
snprintf(buff, MIN(512, eq - dot), "%s", dot + 1);
-
THROWF(arg_error, 0,
"Unknown setting of the log category: '%s'", buff);
+
xbt_die(
"Unknown setting of the log category: '%s'", buff);
}
set->catname = (char *) xbt_malloc(dot - name + 1);
}
set->catname = (char *) xbt_malloc(dot - name + 1);