-/** \name DEBUG
- * \ingroup XBT_log
- * Log something to the current default category under the debug priority.
- * \param f the format string
- * \param a1 first argument of the format
- * \param a2 second argument of the format
- * \param a3 third argument of the format
- * \param a4 fourth argument of the format
- * \param a5 fifth argument of the format
- * \param a6 sixth argument of the format
- *
- * The macros DEBUG0 ... DEBUG5 naturally also exist, but are not listed here
- * for sake of clarity. They just differ in the number of arguments passed
- * along with the format string.
- */
-/* @{ */
-#define DEBUG0(f) LOG0(xbt_log_priority_debug, f)
-#define DEBUG1(f,a1) LOG1(xbt_log_priority_debug, f,a1)
-#define DEBUG2(f,a1,a2) LOG2(xbt_log_priority_debug, f,a1,a2)
-#define DEBUG3(f,a1,a2,a3) LOG3(xbt_log_priority_debug, f,a1,a2,a3)
-#define DEBUG4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_debug, f,a1,a2,a3,a4)
-#define DEBUG5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_debug, f,a1,a2,a3,a4,a5)
-#define DEBUG6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6)
-#define DEBUG7(f,a1,a2,a3,a4,a5,a6,a7) LOG7(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7)
-#define DEBUG8(f,a1,a2,a3,a4,a5,a6,a7,a8) LOG8(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7,a8)
-/* @} */
-
-/** \name VERB
- * \ingroup XBT_log
- * Log something to the current default category under the verbose priority.
- * \param f the format string
- * \param a1 first argument of the format
- * \param a2 second argument of the format
- * \param a3 third argument of the format
- * \param a4 fourth argument of the format
- * \param a5 fifth argument of the format
- * \param a6 sixth argument of the format
- *
- * The macros VERB0 ... VERB5 naturally also exist, but are not listed here
- * for sake of clarity. They just differ in the number of arguments passed
- * along with the format string.
- */
-/* @{ */
-#define VERB0(f) LOG0(xbt_log_priority_verbose, f)
-#define VERB1(f,a1) LOG1(xbt_log_priority_verbose, f,a1)
-#define VERB2(f,a1,a2) LOG2(xbt_log_priority_verbose, f,a1,a2)
-#define VERB3(f,a1,a2,a3) LOG3(xbt_log_priority_verbose, f,a1,a2,a3)
-#define VERB4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_verbose, f,a1,a2,a3,a4)
-#define VERB5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5)
-#define VERB6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6)
-/* @} */
-
-/** \name INFO
- * \ingroup XBT_log
- * Log something to the current default category under the info priority.
- * \param f the format string
- * \param a1 first argument of the format
- * \param a2 second argument of the format
- * \param a3 third argument of the format
- * \param a4 fourth argument of the format
- * \param a5 fifth argument of the format
- * \param a6 sixth argument of the format
- *
- * The macros INFO0 ... INFO5 naturally also exist, but are not listed here
- * for sake of clarity. They just differ in the number of arguments passed
- * along with the format string.
- */
-/* @{ */
-#define INFO0(f) LOG0(xbt_log_priority_info, f)
-#define INFO1(f,a1) LOG1(xbt_log_priority_info, f,a1)
-#define INFO2(f,a1,a2) LOG2(xbt_log_priority_info, f,a1,a2)
-#define INFO3(f,a1,a2,a3) LOG3(xbt_log_priority_info, f,a1,a2,a3)
-#define INFO4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_info, f,a1,a2,a3,a4)
-#define INFO5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_info, f,a1,a2,a3,a4,a5)
-#define INFO6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6)
-#define INFO7(f,a1,a2,a3,a4,a5,a6,a7) LOG7(xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6,a7)
-#define INFO8(f,a1,a2,a3,a4,a5,a6,a7,a8) LOG8(xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6,a7,a8)
-/* @} */
-
-/** \name WARN
- * \ingroup XBT_log
- * Log something to the current default category under the warning priority.
- * \param f the format string
- * \param a1 first argument of the format
- * \param a2 second argument of the format
- * \param a3 third argument of the format
- * \param a4 fourth argument of the format
- * \param a5 fifth argument of the format
- * \param a6 sixth argument of the format
- *
- * The macros WARN0 ... WARN5 naturally also exist, but are not listed here
- * for sake of clarity. They just differ in the number of arguments passed
- * along with the format string.
- */
-/* @{ */
-#define WARN0(f) LOG0(xbt_log_priority_warning, f)
-#define WARN1(f,a1) LOG1(xbt_log_priority_warning, f,a1)
-#define WARN2(f,a1,a2) LOG2(xbt_log_priority_warning, f,a1,a2)
-#define WARN3(f,a1,a2,a3) LOG3(xbt_log_priority_warning, f,a1,a2,a3)
-#define WARN4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_warning, f,a1,a2,a3,a4)
-#define WARN5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_warning, f,a1,a2,a3,a4,a5)
-#define WARN6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6)
-/* @} */
-
-/** \name ERROR
- * \ingroup XBT_log
- * Log something to the current default category under the error priority.
- * \param f the format string
- * \param a1 first argument of the format
- * \param a2 second argument of the format
- * \param a3 third argument of the format
- * \param a4 fourth argument of the format
- * \param a5 fifth argument of the format
- * \param a6 sixth argument of the format
- *
- * The macros ERROR0 ... ERROR5 naturally also exist, but are not listed here
- * for sake of clarity. They just differ in the number of arguments passed
- * along with the format string.
- */
-/* @{ */
-#define ERROR0(f) LOG0(xbt_log_priority_error, f)
-#define ERROR1(f,a1) LOG1(xbt_log_priority_error, f,a1)
-#define ERROR2(f,a1,a2) LOG2(xbt_log_priority_error, f,a1,a2)
-#define ERROR3(f,a1,a2,a3) LOG3(xbt_log_priority_error, f,a1,a2,a3)
-#define ERROR4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_error, f,a1,a2,a3,a4)
-#define ERROR5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_error, f,a1,a2,a3,a4,a5)
-#define ERROR6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6)
-/* @} */
-
-/** \name CRITICAL
- * \ingroup XBT_log
- * Log something to the current default category under the critical priority.
- * \param f the format string
- * \param a1 first argument of the format
- * \param a2 second argument of the format
- * \param a3 third argument of the format
- * \param a4 fourth argument of the format
- * \param a5 fifth argument of the format
- * \param a6 sixth argument of the format
- *
- * The macros CRITICAL0 ... CRITICAL5 naturally also exist, but are not listed here
- * for sake of clarity. They just differ in the number of arguments passed
- * along with the format string.
- */
-/* @{ */
-#define CRITICAL0(f) LOG0(xbt_log_priority_critical, f)
-#define CRITICAL1(f,a1) LOG1(xbt_log_priority_critical, f,a1)
-#define CRITICAL2(f,a1,a2) LOG2(xbt_log_priority_critical, f,a1,a2)
-#define CRITICAL3(f,a1,a2,a3) LOG3(xbt_log_priority_critical, f,a1,a2,a3)
-#define CRITICAL4(f,a1,a2,a3,a4) LOG4(xbt_log_priority_critical, f,a1,a2,a3,a4)
-#define CRITICAL5(f,a1,a2,a3,a4,a5) LOG5(xbt_log_priority_critical, f,a1,a2,a3,a4,a5)
-#define CRITICAL6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6)
-/* @} */
-
-#define XBT_IN LOG1(xbt_log_priority_trace, ">> begin of %s", _XBT_FUNCTION)
-#define XBT_IN1(fmt,a) LOG2(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, a)
-#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_OUT LOG1(xbt_log_priority_trace, "<< end of %s", _XBT_FUNCTION)
-#define XBT_HERE LOG0(xbt_log_priority_trace, "-- was here")
-
-#endif /* ! _XBT_LOG_H_ */
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @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, ...) XBT_CLOG(_XBT_LOGV(categ), xbt_log_priority_debug, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log an event at the VERB priority on the specified category with these args.
+ */
+#define XBT_CVERB(categ, ...) XBT_CLOG(_XBT_LOGV(categ), xbt_log_priority_verbose, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log an event at the INFO priority on the specified category with these args.
+ */
+#define XBT_CINFO(categ, ...) XBT_CLOG(_XBT_LOGV(categ), xbt_log_priority_info, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log an event at the WARN priority on the specified category with these args.
+ */
+#define XBT_CWARN(categ, ...) XBT_CLOG(_XBT_LOGV(categ), xbt_log_priority_warning, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log an event at the ERROR priority on the specified category with these args.
+ */
+#define XBT_CERROR(categ, ...) XBT_CLOG(_XBT_LOGV(categ), xbt_log_priority_error, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log an event at the CRITICAL priority on the specified category with these args.
+ */
+#define XBT_CCRITICAL(categ, ...) XBT_CLOG(_XBT_LOGV(categ), xbt_log_priority_critical, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @param ... the format string and its arguments
+ * @brief Log an event at the DEBUG priority on the default category with these args.
+ */
+#define XBT_DEBUG(...) XBT_LOG(xbt_log_priority_debug, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log an event at the VERB priority on the default category with these args.
+ */
+#define XBT_VERB(...) XBT_LOG(xbt_log_priority_verbose, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log an event at the INFO priority on the default category with these args.
+ */
+#define XBT_INFO(...) XBT_LOG(xbt_log_priority_info, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log an event at the WARN priority on the default category with these args.
+ */
+#define XBT_WARN(...) XBT_LOG(xbt_log_priority_warning, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log an event at the ERROR priority on the default category with these args.
+ */
+#define XBT_ERROR(...) XBT_LOG(xbt_log_priority_error, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log an event at the CRITICAL priority on the default category with these args.
+ */
+#define XBT_CRITICAL(...) XBT_LOG(xbt_log_priority_critical, __VA_ARGS__)
+
+#define _XBT_IN_OUT(...) \
+ _XBT_IF_ONE_ARG(_XBT_IN_OUT_ARG1, _XBT_IN_OUT_ARGN, __VA_ARGS__)(__VA_ARGS__)
+#define _XBT_IN_OUT_ARG1(fmt) \
+ XBT_LOG(xbt_log_priority_trace, fmt, __func__)
+#define _XBT_IN_OUT_ARGN(fmt, ...) \
+ XBT_LOG(xbt_log_priority_trace, fmt, __func__, __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log at TRACE priority that we entered in current function, appending a user specified format.
+ */
+#define XBT_IN(...) _XBT_IN_OUT(">> begin of %s" __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log at TRACE priority that we exited the current function, appending a user specified format.
+ */
+#define XBT_OUT(...) _XBT_IN_OUT("<< end of %s" __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log at TRACE priority a message indicating that we reached that point, appending a user specified format.
+ */
+#define XBT_HERE(...) XBT_LOG(xbt_log_priority_trace, "-- was here" __VA_ARGS__)
+
+/** @ingroup XBT_log
+ * @hideinitializer
+ * @brief Log help messages through category xbt.xbt_help.
+ */
+#define XBT_HELP(...) XBT_CINFO(xbt_help, __VA_ARGS__)
+
+SG_END_DECL()
+#endif /* ! _XBT_LOG_H_ */