From 096cc96b4a60a70773a3cc632d56e6025669ba5a Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Tue, 9 Jul 2013 14:29:42 +0200 Subject: [PATCH 1/1] Crash with message when trying to use a log level that is not allowed (without enable_debug, for example) --- include/xbt/log.h | 2 +- src/xbt/log.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/xbt/log.h b/include/xbt/log.h index fe199ac475..d631073f48 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -60,7 +60,7 @@ typedef enum { /* * define NLOG to disable at compilation time any logging request - * define NDEBUG to disable at compilation time any logging request of priority below INFO + * define NDEBUG to disable at compilation time any logging request of priority below VERBOSE */ diff --git a/src/xbt/log.c b/src/xbt/log.c index c560de6d9f..c966b11d00 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -1100,7 +1100,12 @@ static xbt_log_setting_t _xbt_log_parse_setting(const char *control_string) break; } } - if (i < xbt_log_priority_infinite) { + + if(ithresh = (e_xbt_log_priority_t) i; } else { THROWF(arg_error, 0, -- 2.20.1