Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New function to get the element count of a set
[simgrid.git] / include / xbt / log.h
index 45b9772..b75df7f 100644 (file)
@@ -37,7 +37,7 @@
 #include "xbt/misc.h"
 
 #include <stdarg.h>
-
+SG_BEGIN_DECL()
 /**\brief Log priorities
  * \ingroup XBT_log
  *
@@ -138,7 +138,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_LOGV(cname)
+        static xbt_log_category_t _XBT_LOGV(default) _XBT_GNUC_UNUSED = &_XBT_LOGV(cname) 
 #endif
 
 /**
@@ -180,6 +180,18 @@ typedef enum {
 #define XBT_LOG_EXTERNAL_CATEGORY(cname) \
    extern s_xbt_log_category_t _XBT_LOGV(cname)
 
+/**
+ * \ingroup XBT_log
+ * \param cname name of the cat
+ * \hideinitializer
+ *
+ * Indicates that the default category of this file was declared in another file.
+ */
+
+#define XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(cname) \
+   XBT_LOG_EXTERNAL_CATEGORY(cname);\
+   XBT_LOG_DEFAULT_CATEGORY(cname)
+
 /* Functions you may call */
 
 extern void xbt_log_control_set(const char* cs);
@@ -570,7 +582,9 @@ extern xbt_log_appender_t xbt_log_default_appender;
 #define XBT_IN2(fmt,a,b)     LOG3(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, a,b)
 #define XBT_IN3(fmt,a,b,c)   LOG4(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, a,b,c)
 #define XBT_IN4(fmt,a,b,c,d) LOG5(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, a,b,c,d)
+#define XBT_IN5(fmt,a,b,c,d,e) LOG6(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, a,b,c,d,e)
 #define XBT_OUT              LOG1(xbt_log_priority_trace, "<< end of %s",       _XBT_FUNCTION)
 #define XBT_HERE             LOG0(xbt_log_priority_trace, "-- was here")
+SG_END_DECL()
 
 #endif /* ! _XBT_LOG_H_ */