1 /* log - a generic logging facility in the spirit of log4j */
3 /* Copyright (c) 2004-2015. The SimGrid Team.
4 * All rights reserved. */
6 /* This program is free software; you can redistribute it and/or modify it
7 * under the terms of the license (GNU LGPL) which comes with this package. */
9 /** @addtogroup XBT_log
10 * @brief A generic logging facility in the spirit of log4j (grounding feature)
15 /** \defgroup XBT_log_cats Existing log categories
17 * \brief (automatically extracted)
19 * This is the list of all existing log categories in SimGrid.
20 * This list was automatically extracted from the source code by
21 * the tools/doxygen/xbt_log_extract_hierarchy.pl utility.
23 * You can thus be certain that it is uptodate, but it may somehow
24 * lack a final manual touch.
25 * Anyway, nothing's perfect ;)
28 /* XBT_LOG_MAYDAY: define this to replace the logging facilities with basic
29 printf function. Useful to debug the logging facilities themselves */
31 //#define XBT_LOG_MAYDAY
38 #include <stddef.h> /* NULL */
40 /**\brief Log priorities
43 * The different existing priorities.
47 xbt_log_priority_none = 0, /** used internally (don't poke with)*/
49 xbt_log_priority_trace = 1, /**< enter and return of some functions */
50 xbt_log_priority_debug = 2, /**< crufty output */
51 xbt_log_priority_verbose = 3, /**< verbose output for the user wanting more */
52 xbt_log_priority_info = 4, /**< output about the regular functionning */
53 xbt_log_priority_warning = 5, /**< minor issue encountered */
54 xbt_log_priority_error = 6, /**< issue encountered */
55 xbt_log_priority_critical = 7, /**< major issue encountered */
57 xbt_log_priority_infinite = 8, /**< value for XBT_LOG_STATIC_THRESHOLD to not log */
60 xbt_log_priority_uninitialized = -1 /* used internally (don't poke with) */
62 } e_xbt_log_priority_t;
66 * define NLOG to disable at compilation time any logging request
67 * define NDEBUG to disable at compilation time any logging request of priority below VERBOSE
72 * @def XBT_LOG_STATIC_THRESHOLD
75 * All logging requests with priority < XBT_LOG_STATIC_THRESHOLD are disabled at
76 * compile time, i.e., compiled out.
79 # define XBT_LOG_STATIC_THRESHOLD xbt_log_priority_infinite
83 # define XBT_LOG_STATIC_THRESHOLD xbt_log_priority_verbose
84 # else /* !NLOG && !NDEBUG */
86 # ifndef XBT_LOG_STATIC_THRESHOLD
87 # define XBT_LOG_STATIC_THRESHOLD xbt_log_priority_none
88 # endif /* !XBT_LOG_STATIC_THRESHOLD */
90 #endif /* !defined(NLOG) */
92 /* Transforms a category name to a global variable name. */
93 #define _XBT_LOGV(cat) _XBT_LOG_CONCAT(_simgrid_log_category__, cat)
94 #define _XBT_LOGV_CTOR(cat) _XBT_LOG_CONCAT2(_XBT_LOGV(cat), __constructor__)
95 #define _XBT_LOG_CONCAT(x, y) x ## y
96 #define _XBT_LOG_CONCAT2(x, y) _XBT_LOG_CONCAT(x, y)
97 /* Apparently, constructor priorities are not supported by gcc on Macs */
98 #if defined(__GNUC__) && defined(__APPLE__)
99 # define _XBT_LOGV_CTOR_ATTRIBUTE
101 # define _XBT_LOGV_CTOR_ATTRIBUTE _XBT_GNUC_CONSTRUCTOR(600)
104 /* The root of the category hierarchy. */
105 #define XBT_LOG_ROOT_CAT root
107 /* The whole tree of categories is connected by setting the address of the
108 * parent category as a field of the child one. This is normally done at the
109 * first use of the category.
111 * It is however necessary to make this connections as early as possible, if we
112 * want the category to be listed by --help-log-categories.
114 * When possible, the initializations takes place automatically before the start
115 * of main(). It's the case when compiling with gcc.
117 * For the other cases, you can use the XBT_LOG_CONNECT(cat) macro to force
118 * early initialization. See, for example, in xbt/log.c, the function
119 * xbt_log_connect_categories().
122 #define XBT_LOG_CONNECT(cat) \
124 extern void _XBT_LOGV_CTOR(cat)(void); \
125 _XBT_LOGV_CTOR(cat)(); \
128 /* XBT_LOG_NEW_SUBCATEGORY_helper:
129 * Implementation of XBT_LOG_NEW_SUBCATEGORY, which must declare "extern parent" in addition
130 * to avoid an extra declaration of root when XBT_LOG_NEW_SUBCATEGORY is called by
131 * XBT_LOG_NEW_CATEGORY */
132 #define XBT_LOG_NEW_SUBCATEGORY_helper(catName, parent, desc) \
134 extern void _XBT_LOGV_CTOR(catName)(void) _XBT_LOGV_CTOR_ATTRIBUTE; \
135 void _XBT_LOGV_CTOR(catName)(void) \
137 XBT_LOG_EXTERNAL_CATEGORY(catName); \
138 if (!_XBT_LOGV(catName).initialized) { \
139 _xbt_log_cat_init(&_XBT_LOGV(catName), xbt_log_priority_uninitialized); \
143 XBT_EXPORT_NO_IMPORT(s_xbt_log_category_t) _XBT_LOGV(catName) = { \
144 &_XBT_LOGV(parent), \
145 NULL /* firstChild */, \
146 NULL /* nextSibling */, \
149 0 /*initialized */, \
150 xbt_log_priority_uninitialized /* threshold */, \
151 1 /* isThreshInherited */, \
152 NULL /* appender */, \
159 * \param catName name of new category
160 * \param parent father of the new category in the tree
161 * \param desc string describing the purpose of this category
164 * Defines a new subcategory of the parent.
166 #define XBT_LOG_NEW_SUBCATEGORY(catName, parent, desc) \
167 XBT_LOG_EXTERNAL_CATEGORY(parent); \
168 XBT_LOG_NEW_SUBCATEGORY_helper(catName, parent, desc) \
172 * \param catName name of new category
173 * \param desc string describing the purpose of this category
176 * Creates a new subcategory of the root category.
178 # define XBT_LOG_NEW_CATEGORY(catName,desc) \
179 XBT_LOG_NEW_SUBCATEGORY_helper(catName, XBT_LOG_ROOT_CAT, desc)
184 * \param cname name of the cat
187 * Indicates which category is the default one.
190 #if defined(XBT_LOG_MAYDAY) /*|| defined (NLOG) * turning logging off */
191 # define XBT_LOG_DEFAULT_CATEGORY(cname)
193 # define XBT_LOG_DEFAULT_CATEGORY(cname) \
194 static xbt_log_category_t _XBT_LOGV(default) XBT_ATTRIB_UNUSED = &_XBT_LOGV(cname)
199 * \param cname name of the cat
200 * \param desc string describing the purpose of this category
203 * Creates a new subcategory of the root category and makes it the default
204 * (used by macros that don't explicitly specify a category).
206 # define XBT_LOG_NEW_DEFAULT_CATEGORY(cname,desc) \
207 XBT_LOG_NEW_CATEGORY(cname,desc); \
208 XBT_LOG_DEFAULT_CATEGORY(cname)
212 * \param cname name of the cat
213 * \param parent name of the parent
214 * \param desc string describing the purpose of this category
217 * Creates a new subcategory of the parent category and makes it the default
218 * (used by macros that don't explicitly specify a category).
220 #define XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cname, parent, desc) \
221 XBT_LOG_NEW_SUBCATEGORY(cname, parent, desc); \
222 XBT_LOG_DEFAULT_CATEGORY(cname)
226 * \param cname name of the cat
229 * Indicates that a category you'll use in this file (to get subcategories of it,
230 * for example) really lives in another file.
233 #define XBT_LOG_EXTERNAL_CATEGORY(cname) \
234 extern s_xbt_log_category_t _XBT_LOGV(cname)
238 * \param cname name of the cat
241 * Indicates that the default category of this file was declared in another file.
244 #define XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(cname) \
245 XBT_LOG_EXTERNAL_CATEGORY(cname);\
246 XBT_LOG_DEFAULT_CATEGORY(cname)
248 /* Functions you may call */
250 XBT_PUBLIC(void) xbt_log_control_set(const char *cs);
252 /* Forward declarations */
253 typedef struct xbt_log_appender_s s_xbt_log_appender_t,
255 typedef struct xbt_log_layout_s s_xbt_log_layout_t, *xbt_log_layout_t;
256 typedef struct xbt_log_event_s s_xbt_log_event_t, *xbt_log_event_t;
257 typedef struct xbt_log_category_s s_xbt_log_category_t,
261 * Do NOT access any members of this structure directly. FIXME: move to private?
264 struct xbt_log_category_s {
265 xbt_log_category_t parent;
266 xbt_log_category_t firstChild;
267 xbt_log_category_t nextSibling;
269 const char *description;
272 int isThreshInherited;
273 xbt_log_appender_t appender;
274 xbt_log_layout_t layout;
278 struct xbt_log_event_s {
279 xbt_log_category_t cat;
280 e_xbt_log_priority_t priority;
281 const char *fileName;
282 const char *functionName;
290 * \ingroup XBT_log_implem
291 * \param cat the category (not only its name, but the variable)
292 * \param thresholdPriority the priority
294 * Programatically alters a category's threshold priority (don't use).
296 XBT_PUBLIC(void) xbt_log_threshold_set(xbt_log_category_t cat,
301 * \ingroup XBT_log_implem
302 * \param cat the category (not only its name, but the variable)
303 * \param app the appender
305 * Programatically sets the category's appender.
306 * (the prefered interface is throught xbt_log_control_set())
309 XBT_PUBLIC(void) xbt_log_appender_set(xbt_log_category_t cat,
310 xbt_log_appender_t app);
312 * \ingroup XBT_log_implem
313 * \param cat the category (not only its name, but the variable)
314 * \param lay the layout
316 * Programatically sets the category's layout.
317 * (the prefered interface is throught xbt_log_control_set())
320 XBT_PUBLIC(void) xbt_log_layout_set(xbt_log_category_t cat,
321 xbt_log_layout_t lay);
324 * \ingroup XBT_log_implem
325 * \param cat the category (not only its name, but the variable)
326 * \param additivity whether logging actions must be passed to parent.
328 * Programatically sets whether the logging actions must be passed to
329 * the parent category.
330 * (the prefered interface is throught xbt_log_control_set())
333 XBT_PUBLIC(void) xbt_log_additivity_set(xbt_log_category_t cat,
336 /** @brief create a new simple layout
338 * This layout is not as flexible as the pattern one
340 XBT_PUBLIC(xbt_log_layout_t) xbt_log_layout_simple_new(char *arg);
341 XBT_PUBLIC(xbt_log_layout_t) xbt_log_layout_format_new(char *arg);
342 XBT_PUBLIC(xbt_log_appender_t) xbt_log_appender_file_new(char *arg);
343 XBT_PUBLIC(xbt_log_appender_t) xbt_log_appender2_file_new(char *arg,int roll);
346 /* ********************************** */
347 /* Functions that you shouldn't call */
348 /* ********************************** */
349 XBT_PUBLIC(void) _xbt_log_event_log(xbt_log_event_t ev,
351 ...) XBT_ATTRIB_PRINTF(2, 3);
353 XBT_PUBLIC(int) _xbt_log_cat_init(xbt_log_category_t category,
354 e_xbt_log_priority_t priority);
358 XBT_PUBLIC_DATA(s_xbt_log_category_t) _XBT_LOGV(XBT_LOG_ROOT_CAT);
360 // If we `dllexport` the root log category, MinGW does not want us to
361 // take its address with the error:
362 // > initializer element is not constant
363 // When using auto-import, MinGW is happy.
364 // We should handle this for non-root log categories as well.
365 extern s_xbt_log_category_t _XBT_LOGV(XBT_LOG_ROOT_CAT);
368 extern xbt_log_appender_t xbt_log_default_appender;
369 extern xbt_log_layout_t xbt_log_default_layout;
371 /* ********************** */
372 /* Public functions again */
373 /* ********************** */
377 * \param catName name of the category
378 * \param priority minimal priority to be enabled to return true (must be #e_xbt_log_priority_t)
381 * Returns true if the given priority is enabled for the category.
382 * If you have expensive expressions that are computed outside of the log
383 * command and used only within it, you should make its evaluation conditional
386 #define XBT_LOG_ISENABLED(catName, priority) \
387 _XBT_LOG_ISENABLEDV(_XBT_LOGV(catName), priority)
390 * Helper function that implements XBT_LOG_ISENABLED.
393 * First part is a compile-time constant.
394 * Call to xbt_log_cat_init only happens once.
396 #define _XBT_LOG_ISENABLEDV(catv, priority) \
397 (priority >= XBT_LOG_STATIC_THRESHOLD \
398 && ((catv).initialized || _xbt_log_cat_init(&(catv), priority)) \
399 && priority >= (catv).threshold)
403 * Some kludge macros to ease maintenance. See how they're used below.
405 * IMPLEMENTATION NOTE: To reduce the parameter passing overhead of an enabled
406 * message, the many parameters passed to the logging function are packed in a
407 * structure. Since these values will be usually be passed to at least 3
408 * functions, this is a win.
409 * It also allows adding new values (such as a timestamp) without breaking
411 * Setting the LogEvent's valist member is done inside _log_logEvent.
416 #ifdef XBT_LOG_MAYDAY
417 # define XBT_CLOG(cat, prio, ...) \
418 _XBT_IF_ONE_ARG(_XBT_CLOG_ARG1, _XBT_CLOG_ARGN, __VA_ARGS__)(__VA_ARGS__)
419 # define _XBT_CLOG_ARG1(f) \
420 fprintf(stderr,"%s:%d:\n" f, __FILE__, __LINE__)
421 # define _XBT_CLOG_ARGN(f, ...) \
422 fprintf(stderr,"%s:%d:\n" f, __FILE__, __LINE__, __VA_ARGS__)
423 # define XBT_LOG(...) XBT_CLOG(0, __VA_ARGS__)
426 // This code is duplicated to remove one level of indirection, working around a MSVC bug
427 // See: http://stackoverflow.com/questions/9183993/msvc-variadic-macro-expansion
429 # define XBT_CLOG(category, prio, ...) \
431 if (_XBT_LOG_ISENABLEDV((category), prio)) { \
432 s_xbt_log_event_t _log_ev; \
433 _log_ev.cat = &(category); \
434 _log_ev.priority = (prio); \
435 _log_ev.fileName = __FILE__; \
436 _log_ev.functionName = _XBT_FUNCTION; \
437 _log_ev.lineNum = __LINE__; \
438 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
442 # define XBT_LOG(prio,...) \
444 if (_XBT_LOG_ISENABLEDV((*_simgrid_log_category__default), prio)) { \
445 s_xbt_log_event_t _log_ev; \
446 _log_ev.cat = _simgrid_log_category__default; \
447 _log_ev.priority = (prio); \
448 _log_ev.fileName = __FILE__; \
449 _log_ev.functionName = _XBT_FUNCTION; \
450 _log_ev.lineNum = __LINE__; \
451 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
458 * \param categ the category on which to log
459 * \param ... the format string and its arguments
460 * @brief Log an event at the DEBUG priority on the specified category with these args.
462 #define XBT_CDEBUG(categ, ...) \
464 if (XBT_LOG_ISENABLED (categ, xbt_log_priority_debug)) { \
465 s_xbt_log_event_t _log_ev; \
466 _log_ev.cat = &(_XBT_LOGV(categ)); \
467 _log_ev.priority = xbt_log_priority_debug; \
468 _log_ev.fileName = __FILE__; \
469 _log_ev.functionName = _XBT_FUNCTION; \
470 _log_ev.lineNum = __LINE__; \
471 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
477 * @brief Log an event at the VERB priority on the specified category with these args.
479 #define XBT_CVERB(categ, ...) \
481 if (XBT_LOG_ISENABLED (categ, xbt_log_priority_verbose)) { \
482 s_xbt_log_event_t _log_ev; \
483 _log_ev.cat = &(_XBT_LOGV(categ)); \
484 _log_ev.priority = xbt_log_priority_verbose; \
485 _log_ev.fileName = __FILE__; \
486 _log_ev.functionName = _XBT_FUNCTION; \
487 _log_ev.lineNum = __LINE__; \
488 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
494 * @brief Log an event at the INFO priority on the specified category with these args.
496 #define XBT_CINFO(categ, ...) \
498 if (XBT_LOG_ISENABLED (categ, xbt_log_priority_info)) { \
499 s_xbt_log_event_t _log_ev; \
500 _log_ev.cat = &(_XBT_LOGV(categ)); \
501 _log_ev.priority = xbt_log_priority_info; \
502 _log_ev.fileName = __FILE__; \
503 _log_ev.functionName = _XBT_FUNCTION; \
504 _log_ev.lineNum = __LINE__; \
505 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
512 * @brief Log an event at the WARN priority on the specified category with these args.
514 #define XBT_CWARN(categ, ...) \
516 if (XBT_LOG_ISENABLED (categ, xbt_log_priority_warning)) { \
517 s_xbt_log_event_t _log_ev; \
518 _log_ev.cat = &(_XBT_LOGV(categ)); \
519 _log_ev.priority = xbt_log_priority_warning; \
520 _log_ev.fileName = __FILE__; \
521 _log_ev.functionName = _XBT_FUNCTION; \
522 _log_ev.lineNum = __LINE__; \
523 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
530 * @brief Log an event at the ERROR priority on the specified category with these args.
532 #define XBT_CERROR(categ, ...) \
534 if (XBT_LOG_ISENABLED (categ, xbt_log_priority_error)) { \
535 s_xbt_log_event_t _log_ev; \
536 _log_ev.cat = &(_XBT_LOGV(categ)); \
537 _log_ev.priority = xbt_log_priority_error; \
538 _log_ev.fileName = __FILE__; \
539 _log_ev.functionName = _XBT_FUNCTION; \
540 _log_ev.lineNum = __LINE__; \
541 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
547 * @brief Log an event at the CRITICAL priority on the specified category with these args (CCRITICALn exists for any n<10).
549 #define XBT_CCRITICAL(categ, ...) \
551 if (XBT_LOG_ISENABLED (categ, xbt_log_priority_critical)) { \
552 s_xbt_log_event_t _log_ev; \
553 _log_ev.cat = &(_XBT_LOGV(categ)); \
554 _log_ev.priority = xbt_log_priority_critical; \
555 _log_ev.fileName = __FILE__; \
556 _log_ev.functionName = _XBT_FUNCTION; \
557 _log_ev.lineNum = __LINE__; \
558 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
564 * \param ... the format string and its arguments
565 * @brief Log an event at the DEBUG priority on the default category with these args.
567 #define XBT_DEBUG(...) \
569 if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default, \
570 xbt_log_priority_debug)) { \
571 s_xbt_log_event_t _log_ev; \
572 _log_ev.cat = _simgrid_log_category__default; \
573 _log_ev.priority = xbt_log_priority_debug; \
574 _log_ev.fileName = __FILE__; \
575 _log_ev.functionName = _XBT_FUNCTION; \
576 _log_ev.lineNum = __LINE__; \
577 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
583 * @brief Log an event at the VERB priority on the default category with these args.
585 #define XBT_VERB(...) \
587 if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default, \
588 xbt_log_priority_verbose)) { \
589 s_xbt_log_event_t _log_ev; \
590 _log_ev.cat = _simgrid_log_category__default; \
591 _log_ev.priority = xbt_log_priority_verbose; \
592 _log_ev.fileName = __FILE__; \
593 _log_ev.functionName = _XBT_FUNCTION; \
594 _log_ev.lineNum = __LINE__; \
595 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
601 * @brief Log an event at the INFO priority on the default category with these args.
603 #define XBT_INFO(...) \
605 if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default, \
606 xbt_log_priority_info)) { \
607 s_xbt_log_event_t _log_ev; \
608 _log_ev.cat = _simgrid_log_category__default; \
609 _log_ev.priority = xbt_log_priority_info; \
610 _log_ev.fileName = __FILE__; \
611 _log_ev.functionName = _XBT_FUNCTION; \
612 _log_ev.lineNum = __LINE__; \
613 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
619 * @brief Log an event at the WARN priority on the default category with these args.
621 #define XBT_WARN(...) \
623 if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default, \
624 xbt_log_priority_warning)) { \
625 s_xbt_log_event_t _log_ev; \
626 _log_ev.cat = _simgrid_log_category__default; \
627 _log_ev.priority = xbt_log_priority_warning; \
628 _log_ev.fileName = __FILE__; \
629 _log_ev.functionName = _XBT_FUNCTION; \
630 _log_ev.lineNum = __LINE__; \
631 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
637 * @brief Log an event at the ERROR priority on the default category with these args.
639 #define XBT_ERROR(...) \
641 if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default, \
642 xbt_log_priority_error)) { \
643 s_xbt_log_event_t _log_ev; \
644 _log_ev.cat = _simgrid_log_category__default; \
645 _log_ev.priority = xbt_log_priority_error; \
646 _log_ev.fileName = __FILE__; \
647 _log_ev.functionName = _XBT_FUNCTION; \
648 _log_ev.lineNum = __LINE__; \
649 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
655 * @brief Log an event at the CRITICAL priority on the default category with these args.
657 #define XBT_CRITICAL(...) \
659 if (_XBT_LOG_ISENABLEDV(*_simgrid_log_category__default, \
660 xbt_log_priority_critical)) { \
661 s_xbt_log_event_t _log_ev; \
662 _log_ev.cat = _simgrid_log_category__default; \
663 _log_ev.priority = xbt_log_priority_critical; \
664 _log_ev.fileName = __FILE__; \
665 _log_ev.functionName = _XBT_FUNCTION; \
666 _log_ev.lineNum = __LINE__; \
667 _xbt_log_event_log(&_log_ev, __VA_ARGS__); \
671 #define _XBT_IN_OUT(...) \
672 _XBT_IF_ONE_ARG(_XBT_IN_OUT_ARG1, _XBT_IN_OUT_ARGN, __VA_ARGS__)(__VA_ARGS__)
673 #define _XBT_IN_OUT_ARG1(fmt) \
674 XBT_LOG(xbt_log_priority_trace, fmt, _XBT_FUNCTION)
675 #define _XBT_IN_OUT_ARGN(fmt, ...) \
676 XBT_LOG(xbt_log_priority_trace, fmt, _XBT_FUNCTION, __VA_ARGS__)
680 * @brief Log at TRACE priority that we entered in current function, appending a user specified format.
682 #define XBT_IN(...) _XBT_IN_OUT(">> begin of %s" __VA_ARGS__)
686 * @brief Log at TRACE priority that we exited the current function, appending a user specified format.
688 #define XBT_OUT(...) _XBT_IN_OUT("<< end of %s" __VA_ARGS__)
692 * @brief Log at TRACE priority a message indicating that we reached that point, appending a user specified format.
694 #define XBT_HERE(...) XBT_LOG(xbt_log_priority_trace, "-- was here" __VA_ARGS__)
696 #ifdef XBT_USE_DEPRECATED
698 /* Kept for backward compatibility. */
700 #define CLOG0(...) XBT_CLOG(__VA_ARGS__)
701 #define CLOG1(...) XBT_CLOG(__VA_ARGS__)
702 #define CLOG2(...) XBT_CLOG(__VA_ARGS__)
703 #define CLOG3(...) XBT_CLOG(__VA_ARGS__)
704 #define CLOG4(...) XBT_CLOG(__VA_ARGS__)
705 #define CLOG5(...) XBT_CLOG(__VA_ARGS__)
706 #define CLOG6(...) XBT_CLOG(__VA_ARGS__)
707 #define CLOG7(...) XBT_CLOG(__VA_ARGS__)
708 #define CLOG8(...) XBT_CLOG(__VA_ARGS__)
709 #define CLOG9(...) XBT_CLOG(__VA_ARGS__)
710 #define CLOG10(...) XBT_CLOG(__VA_ARGS__)
712 #define CDEBUG0(...) XBT_CDEBUG(__VA_ARGS__)
713 #define CDEBUG1(...) XBT_CDEBUG(__VA_ARGS__)
714 #define CDEBUG2(...) XBT_CDEBUG(__VA_ARGS__)
715 #define CDEBUG3(...) XBT_CDEBUG(__VA_ARGS__)
716 #define CDEBUG4(...) XBT_CDEBUG(__VA_ARGS__)
717 #define CDEBUG5(...) XBT_CDEBUG(__VA_ARGS__)
718 #define CDEBUG6(...) XBT_CDEBUG(__VA_ARGS__)
719 #define CDEBUG7(...) XBT_CDEBUG(__VA_ARGS__)
720 #define CDEBUG8(...) XBT_CDEBUG(__VA_ARGS__)
721 #define CDEBUG9(...) XBT_CDEBUG(__VA_ARGS__)
722 #define CDEBUG10(...) XBT_CDEBUG(__VA_ARGS__)
724 #define CVERB0(...) XBT_CVERB(__VA_ARGS__)
725 #define CVERB1(...) XBT_CVERB(__VA_ARGS__)
726 #define CVERB2(...) XBT_CVERB(__VA_ARGS__)
727 #define CVERB3(...) XBT_CVERB(__VA_ARGS__)
728 #define CVERB4(...) XBT_CVERB(__VA_ARGS__)
729 #define CVERB5(...) XBT_CVERB(__VA_ARGS__)
730 #define CVERB6(...) XBT_CVERB(__VA_ARGS__)
731 #define CVERB7(...) XBT_CVERB(__VA_ARGS__)
732 #define CVERB8(...) XBT_CVERB(__VA_ARGS__)
733 #define CVERB9(...) XBT_CVERB(__VA_ARGS__)
734 #define CVERB10(...) XBT_CVERB(__VA_ARGS__)
736 #define CINFO0(...) XBT_CINFO(__VA_ARGS__)
737 #define CINFO1(...) XBT_CINFO(__VA_ARGS__)
738 #define CINFO2(...) XBT_CINFO(__VA_ARGS__)
739 #define CINFO3(...) XBT_CINFO(__VA_ARGS__)
740 #define CINFO4(...) XBT_CINFO(__VA_ARGS__)
741 #define CINFO5(...) XBT_CINFO(__VA_ARGS__)
742 #define CINFO6(...) XBT_CINFO(__VA_ARGS__)
743 #define CINFO7(...) XBT_CINFO(__VA_ARGS__)
744 #define CINFO8(...) XBT_CINFO(__VA_ARGS__)
745 #define CINFO9(...) XBT_CINFO(__VA_ARGS__)
746 #define CINFO10(...) XBT_CINFO(__VA_ARGS__)
748 #define CWARN0(...) XBT_CWARN(__VA_ARGS__)
749 #define CWARN1(...) XBT_CWARN(__VA_ARGS__)
750 #define CWARN2(...) XBT_CWARN(__VA_ARGS__)
751 #define CWARN3(...) XBT_CWARN(__VA_ARGS__)
752 #define CWARN4(...) XBT_CWARN(__VA_ARGS__)
753 #define CWARN5(...) XBT_CWARN(__VA_ARGS__)
754 #define CWARN6(...) XBT_CWARN(__VA_ARGS__)
755 #define CWARN7(...) XBT_CWARN(__VA_ARGS__)
756 #define CWARN8(...) XBT_CWARN(__VA_ARGS__)
757 #define CWARN9(...) XBT_CWARN(__VA_ARGS__)
758 #define CWARN10(...) XBT_CWARN(__VA_ARGS__)
760 #define CERROR0(...) XBT_CERROR(__VA_ARGS__)
761 #define CERROR1(...) XBT_CERROR(__VA_ARGS__)
762 #define CERROR2(...) XBT_CERROR(__VA_ARGS__)
763 #define CERROR3(...) XBT_CERROR(__VA_ARGS__)
764 #define CERROR4(...) XBT_CERROR(__VA_ARGS__)
765 #define CERROR5(...) XBT_CERROR(__VA_ARGS__)
766 #define CERROR6(...) XBT_CERROR(__VA_ARGS__)
767 #define CERROR7(...) XBT_CERROR(__VA_ARGS__)
768 #define CERROR8(...) XBT_CERROR(__VA_ARGS__)
769 #define CERROR9(...) XBT_CERROR(__VA_ARGS__)
770 #define CERROR10(...) XBT_CERROR(__VA_ARGS__)
772 #define CCRITICAL0(...) XBT_CCRITICAL(__VA_ARGS__)
773 #define CCRITICAL1(...) XBT_CCRITICAL(__VA_ARGS__)
774 #define CCRITICAL2(...) XBT_CCRITICAL(__VA_ARGS__)
775 #define CCRITICAL3(...) XBT_CCRITICAL(__VA_ARGS__)
776 #define CCRITICAL4(...) XBT_CCRITICAL(__VA_ARGS__)
777 #define CCRITICAL5(...) XBT_CCRITICAL(__VA_ARGS__)
778 #define CCRITICAL6(...) XBT_CCRITICAL(__VA_ARGS__)
779 #define CCRITICAL7(...) XBT_CCRITICAL(__VA_ARGS__)
780 #define CCRITICAL8(...) XBT_CCRITICAL(__VA_ARGS__)
781 #define CCRITICAL9(...) XBT_CCRITICAL(__VA_ARGS__)
782 #define CCRITICAL10(...) XBT_CCRITICAL(__VA_ARGS__)
784 #define LOG0(...) XBT_LOG(__VA_ARGS__)
785 #define LOG1(...) XBT_LOG(__VA_ARGS__)
786 #define LOG2(...) XBT_LOG(__VA_ARGS__)
787 #define LOG3(...) XBT_LOG(__VA_ARGS__)
788 #define LOG4(...) XBT_LOG(__VA_ARGS__)
789 #define LOG5(...) XBT_LOG(__VA_ARGS__)
790 #define LOG6(...) XBT_LOG(__VA_ARGS__)
791 #define LOG7(...) XBT_LOG(__VA_ARGS__)
792 #define LOG8(...) XBT_LOG(__VA_ARGS__)
793 #define LOG9(...) XBT_LOG(__VA_ARGS__)
794 #define LOG10(...) XBT_LOG(__VA_ARGS__)
796 #define DEBUG0(...) XBT_DEBUG(__VA_ARGS__)
797 #define DEBUG1(...) XBT_DEBUG(__VA_ARGS__)
798 #define DEBUG2(...) XBT_DEBUG(__VA_ARGS__)
799 #define DEBUG3(...) XBT_DEBUG(__VA_ARGS__)
800 #define DEBUG4(...) XBT_DEBUG(__VA_ARGS__)
801 #define DEBUG5(...) XBT_DEBUG(__VA_ARGS__)
802 #define DEBUG6(...) XBT_DEBUG(__VA_ARGS__)
803 #define DEBUG7(...) XBT_DEBUG(__VA_ARGS__)
804 #define DEBUG8(...) XBT_DEBUG(__VA_ARGS__)
805 #define DEBUG9(...) XBT_DEBUG(__VA_ARGS__)
806 #define DEBUG10(...) XBT_DEBUG(__VA_ARGS__)
808 #define VERB0(...) XBT_VERB(__VA_ARGS__)
809 #define VERB1(...) XBT_VERB(__VA_ARGS__)
810 #define VERB2(...) XBT_VERB(__VA_ARGS__)
811 #define VERB3(...) XBT_VERB(__VA_ARGS__)
812 #define VERB4(...) XBT_VERB(__VA_ARGS__)
813 #define VERB5(...) XBT_VERB(__VA_ARGS__)
814 #define VERB6(...) XBT_VERB(__VA_ARGS__)
815 #define VERB7(...) XBT_VERB(__VA_ARGS__)
816 #define VERB8(...) XBT_VERB(__VA_ARGS__)
817 #define VERB9(...) XBT_VERB(__VA_ARGS__)
818 #define VERB10(...) XBT_VERB(__VA_ARGS__)
820 #define INFO0(...) XBT_INFO(__VA_ARGS__)
821 #define INFO1(...) XBT_INFO(__VA_ARGS__)
822 #define INFO2(...) XBT_INFO(__VA_ARGS__)
823 #define INFO3(...) XBT_INFO(__VA_ARGS__)
824 #define INFO4(...) XBT_INFO(__VA_ARGS__)
825 #define INFO5(...) XBT_INFO(__VA_ARGS__)
826 #define INFO6(...) XBT_INFO(__VA_ARGS__)
827 #define INFO7(...) XBT_INFO(__VA_ARGS__)
828 #define INFO8(...) XBT_INFO(__VA_ARGS__)
829 #define INFO9(...) XBT_INFO(__VA_ARGS__)
830 #define INFO10(...) XBT_INFO(__VA_ARGS__)
832 #define WARN0(...) XBT_WARN(__VA_ARGS__)
833 #define WARN1(...) XBT_WARN(__VA_ARGS__)
834 #define WARN2(...) XBT_WARN(__VA_ARGS__)
835 #define WARN3(...) XBT_WARN(__VA_ARGS__)
836 #define WARN4(...) XBT_WARN(__VA_ARGS__)
837 #define WARN5(...) XBT_WARN(__VA_ARGS__)
838 #define WARN6(...) XBT_WARN(__VA_ARGS__)
839 #define WARN7(...) XBT_WARN(__VA_ARGS__)
840 #define WARN8(...) XBT_WARN(__VA_ARGS__)
841 #define WARN9(...) XBT_WARN(__VA_ARGS__)
842 #define WARN10(...) XBT_WARN(__VA_ARGS__)
844 #define ERROR0(...) XBT_ERROR(__VA_ARGS__)
845 #define ERROR1(...) XBT_ERROR(__VA_ARGS__)
846 #define ERROR2(...) XBT_ERROR(__VA_ARGS__)
847 #define ERROR3(...) XBT_ERROR(__VA_ARGS__)
848 #define ERROR4(...) XBT_ERROR(__VA_ARGS__)
849 #define ERROR5(...) XBT_ERROR(__VA_ARGS__)
850 #define ERROR6(...) XBT_ERROR(__VA_ARGS__)
851 #define ERROR7(...) XBT_ERROR(__VA_ARGS__)
852 #define ERROR8(...) XBT_ERROR(__VA_ARGS__)
853 #define ERROR9(...) XBT_ERROR(__VA_ARGS__)
854 #define ERROR10(...) XBT_ERROR(__VA_ARGS__)
856 #define CRITICAL0(...) XBT_CRITICAL(__VA_ARGS__)
857 #define CRITICAL1(...) XBT_CRITICAL(__VA_ARGS__)
858 #define CRITICAL2(...) XBT_CRITICAL(__VA_ARGS__)
859 #define CRITICAL3(...) XBT_CRITICAL(__VA_ARGS__)
860 #define CRITICAL4(...) XBT_CRITICAL(__VA_ARGS__)
861 #define CRITICAL5(...) XBT_CRITICAL(__VA_ARGS__)
862 #define CRITICAL6(...) XBT_CRITICAL(__VA_ARGS__)
863 #define CRITICAL7(...) XBT_CRITICAL(__VA_ARGS__)
864 #define CRITICAL8(...) XBT_CRITICAL(__VA_ARGS__)
865 #define CRITICAL9(...) XBT_CRITICAL(__VA_ARGS__)
866 #define CRITICAL10(...) XBT_CRITICAL(__VA_ARGS__)
868 #define XBT_IN1(...) XBT_IN(__VA_ARGS__);
869 #define XBT_IN2(...) XBT_IN(__VA_ARGS__);
870 #define XBT_IN3(...) XBT_IN(__VA_ARGS__);
871 #define XBT_IN4(...) XBT_IN(__VA_ARGS__);
872 #define XBT_IN5(...) XBT_IN(__VA_ARGS__);
873 #define XBT_IN6(...) XBT_IN(__VA_ARGS__);
878 #endif /* ! _XBT_LOG_H_ */