X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f3134e4315d4c9ae5e713f054c09efdd5a85673b..a7e3b99546ce0ad4289878d12d0b3804d30463c7:/include/xbt/log.h diff --git a/include/xbt/log.h b/include/xbt/log.h index 64ba01ecfb..78a4815a24 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -191,7 +191,7 @@ typedef enum { # define XBT_LOG_DEFAULT_CATEGORY(cname) #else # define XBT_LOG_DEFAULT_CATEGORY(cname) \ - static xbt_log_category_t _XBT_LOGV(default) _XBT_GNUC_UNUSED = &_XBT_LOGV(cname) + static xbt_log_category_t _XBT_LOGV(default) XBT_ATTRIB_UNUSED = &_XBT_LOGV(cname) #endif /** @@ -348,7 +348,7 @@ XBT_PUBLIC(xbt_log_appender_t) xbt_log_appender2_file_new(char *arg,int roll); /* ********************************** */ XBT_PUBLIC(void) _xbt_log_event_log(xbt_log_event_t ev, const char *fmt, - ...) _XBT_GNUC_PRINTF(2, 3); + ...) XBT_ATTRIB_PRINTF(2, 3); XBT_PUBLIC(int) _xbt_log_cat_init(xbt_log_category_t category, e_xbt_log_priority_t priority); @@ -455,13 +455,13 @@ extern xbt_log_layout_t xbt_log_default_layout; /** @ingroup XBT_log * @hideinitializer - * \param c the category on which to log + * \param categ the category on which to log * \param ... the format string and its arguments * @brief Log an event at the DEBUG priority on the specified category with these args. */ #define XBT_CDEBUG(categ, ...) \ do { \ - if (_XBT_LOG_ISENABLEDV(_XBT_LOGV(categ), xbt_log_priority_debug)) {\ + if (XBT_LOG_ISENABLED (categ, xbt_log_priority_debug)) { \ s_xbt_log_event_t _log_ev; \ _log_ev.cat = &(_XBT_LOGV(categ)); \ _log_ev.priority = xbt_log_priority_debug; \ @@ -478,10 +478,10 @@ extern xbt_log_layout_t xbt_log_default_layout; */ #define XBT_CVERB(categ, ...) \ do { \ - if (_XBT_LOG_ISENABLEDV(_XBT_LOGV(categ), xbt_log_priority_verbose)) { \ + if (XBT_LOG_ISENABLED (categ, xbt_log_priority_verbose)) { \ s_xbt_log_event_t _log_ev; \ - _log_ev.cat = &(_XBT_LOGV(categ)); \ - _log_ev.priority = xbt_log_priority_verbose; \ + _log_ev.cat = &(_XBT_LOGV(categ)); \ + _log_ev.priority = xbt_log_priority_verbose; \ _log_ev.fileName = __FILE__; \ _log_ev.functionName = _XBT_FUNCTION; \ _log_ev.lineNum = __LINE__; \ @@ -495,10 +495,10 @@ extern xbt_log_layout_t xbt_log_default_layout; */ #define XBT_CINFO(categ, ...) \ do { \ - if (_XBT_LOG_ISENABLEDV(_XBT_LOGV(categ), xbt_log_priority_info)) { \ + if (XBT_LOG_ISENABLED (categ, xbt_log_priority_info)) { \ s_xbt_log_event_t _log_ev; \ - _log_ev.cat = &(_XBT_LOGV(categ)); \ - _log_ev.priority = xbt_log_priority_info; \ + _log_ev.cat = &(_XBT_LOGV(categ)); \ + _log_ev.priority = xbt_log_priority_info; \ _log_ev.fileName = __FILE__; \ _log_ev.functionName = _XBT_FUNCTION; \ _log_ev.lineNum = __LINE__; \ @@ -513,10 +513,10 @@ extern xbt_log_layout_t xbt_log_default_layout; */ #define XBT_CWARN(categ, ...) \ do { \ - if (_XBT_LOG_ISENABLEDV(_XBT_LOGV(categ), xbt_log_priority_warning)) { \ + if (XBT_LOG_ISENABLED (categ, xbt_log_priority_warning)) { \ s_xbt_log_event_t _log_ev; \ - _log_ev.cat = &(_XBT_LOGV(categ)); \ - _log_ev.priority = xbt_log_priority_warning; \ + _log_ev.cat = &(_XBT_LOGV(categ)); \ + _log_ev.priority = xbt_log_priority_warning; \ _log_ev.fileName = __FILE__; \ _log_ev.functionName = _XBT_FUNCTION; \ _log_ev.lineNum = __LINE__; \ @@ -531,10 +531,10 @@ extern xbt_log_layout_t xbt_log_default_layout; */ #define XBT_CERROR(categ, ...) \ do { \ - if (_XBT_LOG_ISENABLEDV(_XBT_LOGV(categ), xbt_log_priority_error)) { \ + if (XBT_LOG_ISENABLED (categ, xbt_log_priority_error)) { \ s_xbt_log_event_t _log_ev; \ - _log_ev.cat = &(_XBT_LOGV(categ)); \ - _log_ev.priority = xbt_log_priority_error; \ + _log_ev.cat = &(_XBT_LOGV(categ)); \ + _log_ev.priority = xbt_log_priority_error; \ _log_ev.fileName = __FILE__; \ _log_ev.functionName = _XBT_FUNCTION; \ _log_ev.lineNum = __LINE__; \ @@ -548,10 +548,10 @@ extern xbt_log_layout_t xbt_log_default_layout; */ #define XBT_CCRITICAL(categ, ...) \ do { \ - if (_XBT_LOG_ISENABLEDV(_XBT_LOGV(categ), xbt_log_priority_critical)) { \ + if (XBT_LOG_ISENABLED (categ, xbt_log_priority_critical)) { \ s_xbt_log_event_t _log_ev; \ - _log_ev.cat = &(_XBT_LOGV(categ)); \ - _log_ev.priority = xbt_log_priority_critical; \ + _log_ev.cat = &(_XBT_LOGV(categ)); \ + _log_ev.priority = xbt_log_priority_critical; \ _log_ev.fileName = __FILE__; \ _log_ev.functionName = _XBT_FUNCTION; \ _log_ev.lineNum = __LINE__; \