Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a398c405e22f365751b92830fab53f3613521fa9
[simgrid.git] / include / xbt / log.h
1 /* log - a generic logging facility in the spirit of log4j                  */
2
3 /* Copyright (c) 2004-2011. The SimGrid Team.
4  * All rights reserved.                                                     */
5
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. */
8
9 /** @addtogroup XBT_log
10  *  @brief A generic logging facility in the spirit of log4j (grounding feature)
11  *
12  *
13  */
14
15 /** \defgroup XBT_log_cats Existing log categories
16  *  \ingroup XBT_log
17  *  \brief (automatically extracted) 
18  *     
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.
22  *     
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 ;)
26  */
27
28 /* XBT_LOG_MAYDAY: define this to replace the logging facilities with basic
29    printf function. Useful to debug the logging facilities themselves */
30 #undef XBT_LOG_MAYDAY
31 //#define XBT_LOG_MAYDAY
32
33 #ifndef _XBT_LOG_H_
34 #define _XBT_LOG_H_
35
36 #include "xbt/misc.h"
37 #include <stdarg.h>
38 #include <stddef.h>             /* NULL */
39 SG_BEGIN_DECL()
40 /**\brief Log priorities
41  * \ingroup XBT_log
42  *
43  * The different existing priorities.
44 */
45 typedef enum {
46   xbt_log_priority_none = 0,    /* used internally (don't poke with) */
47   xbt_log_priority_trace = 1,          /**< enter and return of some functions */
48   xbt_log_priority_debug = 2,          /**< crufty output  */
49   xbt_log_priority_verbose = 3,        /**< verbose output for the user wanting more */
50   xbt_log_priority_info = 4,           /**< output about the regular functionning */
51   xbt_log_priority_warning = 5,        /**< minor issue encountered */
52   xbt_log_priority_error = 6,          /**< issue encountered */
53   xbt_log_priority_critical = 7,       /**< major issue encountered */
54
55   xbt_log_priority_infinite = 8,       /**< value for XBT_LOG_STATIC_THRESHOLD to not log */
56
57   xbt_log_priority_uninitialized = -1   /* used internally (don't poke with) */
58 } e_xbt_log_priority_t;
59
60
61 /*
62  * define NLOG to disable at compilation time any logging request
63  * define NDEBUG to disable at compilation time any logging request of priority below INFO
64  */
65
66
67 /**
68  * @def XBT_LOG_STATIC_THRESHOLD
69  * @ingroup XBT_log
70  *
71  * All logging requests with priority < XBT_LOG_STATIC_THRESHOLD are disabled at
72  * compile time, i.e., compiled out.
73  */
74 #ifdef NLOG
75 #  define XBT_LOG_STATIC_THRESHOLD xbt_log_priority_infinite
76 #else
77
78 #  ifdef NDEBUG
79 #    define XBT_LOG_STATIC_THRESHOLD xbt_log_priority_verbose
80 #  else                         /* !NLOG && !NDEBUG */
81
82 #    ifndef XBT_LOG_STATIC_THRESHOLD
83 #      define XBT_LOG_STATIC_THRESHOLD xbt_log_priority_none
84 #    endif                      /* !XBT_LOG_STATIC_THRESHOLD */
85 #  endif                        /* NDEBUG */
86 #endif                          /* !defined(NLOG) */
87
88 /* Transforms a category name to a global variable name. */
89 #define _XBT_LOGV(cat) _XBT_LOG_CONCAT(_simgrid_log_category__, cat)
90 #define _XBT_LOGV_CTOR(cat) _XBT_LOG_CONCAT2(_XBT_LOGV(cat), __constructor__)
91 #define _XBT_LOG_CONCAT(x, y) x ## y
92 #define _XBT_LOG_CONCAT2(x, y) _XBT_LOG_CONCAT(x, y)
93
94 /* The root of the category hierarchy. */
95 #define XBT_LOG_ROOT_CAT   root
96
97 /* The whole tree of categories is connected by setting the address of
98  * the parent category as a field of the child one.
99  *
100  * In strict ansi C, we are allowed to initialize a variable with "a
101  * pointer to an lvalue designating an object of static storage
102  * duration" [ISO/IEC 9899:1999, Section 6.6].
103  * 
104  * Unfortunately, Visual C builder does not target any standard
105  * compliance, and C99 is not an exception to this unfortunate rule.
106  * 
107  * So, we work this around by adding a XBT_LOG_CONNECT_PARENT() macro,
108  * allowing to connect a child to its parent. It should be used
109  * during the initialization of the code, before the child category
110  * gets used.
111  * 
112  * When compiling with gcc, this is not necessary (XBT_LOG_CONNECT_PARENT
113  * defines to nothing). When compiling with MSVC, this is needed if
114  * you don't want to see your child category become a child of root
115  * directly.
116  */
117 #if defined(_MSC_VER)
118 # define _XBT_LOG_PARENT_INITIALIZER(parent) NULL
119 # define XBT_LOG_CONNECT_PARENT(child, parent_cat)                      \
120   _XBT_LOGV(child).parent = &_XBT_LOGV(parent_cat)
121 #else
122 # define _XBT_LOG_PARENT_INITIALIZER(parent) &_XBT_LOGV(parent)
123 # define XBT_LOG_CONNECT_PARENT(child, parent_cat)                      \
124   /* xbt_assert(_XBT_LOGV(child).parent == &_XBT_LOGV(parent_cat)); */  \
125   ((void)0)
126 #endif
127
128 #define XBT_LOG_CONNECT(cat)                    \
129   if (1) {                                      \
130     extern void _XBT_LOGV_CTOR(cat)(void);      \
131     _XBT_LOGV_CTOR(cat)();                      \
132   } else ((void)0)
133
134 /* XBT_LOG_NEW_SUBCATEGORY_helper:
135  * Implementation of XBT_LOG_NEW_SUBCATEGORY, which must declare "extern parent" in addition
136  * to avoid an extra declaration of root when XBT_LOG_NEW_SUBCATEGORY is called by
137  * XBT_LOG_NEW_CATEGORY */
138 #define XBT_LOG_NEW_SUBCATEGORY_helper(catName, parent, desc)           \
139   XBT_PUBLIC(void) _XBT_LOGV_CTOR(catName)(void) _XBT_GNUC_CONSTRUCTOR(600); \
140   void _XBT_LOGV_CTOR(catName)(void)                                    \
141   {                                                                     \
142     XBT_LOG_EXTERNAL_CATEGORY(catName);                                 \
143     /* Note: _XBT_LOGV(parent) should be already declared here. */      \
144     XBT_LOG_CONNECT_PARENT(catName, parent);                            \
145     _xbt_log_cat_init(&_XBT_LOGV(catName), xbt_log_priority_uninitialized); \
146   }                                                                     \
147   XBT_EXPORT_NO_IMPORT(s_xbt_log_category_t) _XBT_LOGV(catName) = {     \
148     _XBT_LOG_PARENT_INITIALIZER(parent),                                \
149     NULL /* firstChild */,                                              \
150     NULL /* nextSibling */,                                             \
151     #catName,                                                           \
152     desc,                                                               \
153     0 /*initialized */,                                                 \
154     xbt_log_priority_uninitialized /* threshold */,                     \
155     1 /* isThreshInherited */,                                          \
156     NULL /* appender */,                                                \
157     NULL /* layout */,                                                  \
158     1 /* additivity */                                                  \
159   }
160
161 /**
162  * \ingroup XBT_log
163  * \param catName name of new category
164  * \param parent father of the new category in the tree
165  * \param desc string describing the purpose of this category
166  * \hideinitializer
167  *
168  * Defines a new subcategory of the parent. 
169  */
170 #define XBT_LOG_NEW_SUBCATEGORY(catName, parent, desc)    \
171   XBT_LOG_EXTERNAL_CATEGORY(parent);                      \
172   XBT_LOG_NEW_SUBCATEGORY_helper(catName, parent, desc)   \
173
174 /**
175  * \ingroup XBT_log  
176  * \param catName name of new category
177  * \param desc string describing the purpose of this category
178  * \hideinitializer
179  *
180  * Creates a new subcategory of the root category.
181  */
182 # define XBT_LOG_NEW_CATEGORY(catName,desc)  \
183    XBT_LOG_NEW_SUBCATEGORY_helper(catName, XBT_LOG_ROOT_CAT, desc)
184
185
186 /**
187  * \ingroup XBT_log  
188  * \param cname name of the cat
189  * \hideinitializer
190  *
191  * Indicates which category is the default one.
192  */
193
194 #if defined(XBT_LOG_MAYDAY) || defined(SUPERNOVAE_MODE) /*|| defined (NLOG) * turning logging off */
195 # define XBT_LOG_DEFAULT_CATEGORY(cname)
196 #else
197 # define XBT_LOG_DEFAULT_CATEGORY(cname) \
198          static xbt_log_category_t _XBT_LOGV(default) _XBT_GNUC_UNUSED = &_XBT_LOGV(cname)
199 #endif
200
201 /**
202  * \ingroup XBT_log  
203  * \param cname name of the cat
204  * \param desc string describing the purpose of this category
205  * \hideinitializer
206  *
207  * Creates a new subcategory of the root category and makes it the default
208  * (used by macros that don't explicitly specify a category).
209  */
210 # define XBT_LOG_NEW_DEFAULT_CATEGORY(cname,desc)        \
211     XBT_LOG_NEW_CATEGORY(cname,desc);                   \
212     XBT_LOG_DEFAULT_CATEGORY(cname)
213
214 /**
215  * \ingroup XBT_log  
216  * \param cname name of the cat
217  * \param parent name of the parent
218  * \param desc string describing the purpose of this category
219  * \hideinitializer
220  *
221  * Creates a new subcategory of the parent category and makes it the default
222  * (used by macros that don't explicitly specify a category).
223  */
224 #define XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cname, parent, desc) \
225     XBT_LOG_NEW_SUBCATEGORY(cname, parent, desc);            \
226     XBT_LOG_DEFAULT_CATEGORY(cname)
227
228 /**
229  * \ingroup XBT_log  
230  * \param cname name of the cat
231  * \hideinitializer
232  *
233  * Indicates that a category you'll use in this file (to get subcategories of it, 
234  * for example) really lives in another file.
235  */
236
237 #define XBT_LOG_EXTERNAL_CATEGORY(cname) \
238    extern s_xbt_log_category_t _XBT_LOGV(cname)
239
240 /**
241  * \ingroup XBT_log
242  * \param cname name of the cat
243  * \hideinitializer
244  *
245  * Indicates that the default category of this file was declared in another file.
246  */
247
248 #define XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(cname) \
249    XBT_LOG_EXTERNAL_CATEGORY(cname);\
250    XBT_LOG_DEFAULT_CATEGORY(cname)
251
252 /* Functions you may call */
253
254 XBT_PUBLIC(void) xbt_log_control_set(const char *cs);
255
256 /* Forward declarations */
257 typedef struct xbt_log_appender_s s_xbt_log_appender_t,
258     *xbt_log_appender_t;
259 typedef struct xbt_log_layout_s s_xbt_log_layout_t, *xbt_log_layout_t;
260 typedef struct xbt_log_event_s s_xbt_log_event_t, *xbt_log_event_t;
261 typedef struct xbt_log_category_s s_xbt_log_category_t,
262     *xbt_log_category_t;
263
264 /*
265  * Do NOT access any members of this structure directly. FIXME: move to private?
266  */
267
268 struct xbt_log_category_s {
269   xbt_log_category_t parent;
270   xbt_log_category_t firstChild;
271   xbt_log_category_t nextSibling;
272   const char *name;
273   const char *description;
274   int initialized;
275   int threshold;
276   int isThreshInherited;
277   xbt_log_appender_t appender;
278   xbt_log_layout_t layout;
279   int additivity;
280 };
281
282 struct xbt_log_event_s {
283   xbt_log_category_t cat;
284   e_xbt_log_priority_t priority;
285   const char *fileName;
286   const char *functionName;
287   int lineNum;
288   va_list ap;
289   char *buffer;
290   int buffer_size;
291 };
292
293 /**
294  * \ingroup XBT_log_implem
295  * \param cat the category (not only its name, but the variable)
296  * \param thresholdPriority the priority
297  *
298  * Programatically alters a category's threshold priority (don't use).
299  */
300 XBT_PUBLIC(void) xbt_log_threshold_set(xbt_log_category_t cat,
301                                        e_xbt_log_priority_t
302                                        thresholdPriority);
303
304 /**
305  * \ingroup XBT_log_implem  
306  * \param cat the category (not only its name, but the variable)
307  * \param app the appender
308  *
309  * Programatically sets the category's appender.
310  * (the prefered interface is throught xbt_log_control_set())
311  *
312  */
313 XBT_PUBLIC(void) xbt_log_appender_set(xbt_log_category_t cat,
314                                       xbt_log_appender_t app);
315 /**
316  * \ingroup XBT_log_implem  
317  * \param cat the category (not only its name, but the variable)
318  * \param lay the layout
319  *
320  * Programatically sets the category's layout.
321  * (the prefered interface is throught xbt_log_control_set())
322  *
323  */
324 XBT_PUBLIC(void) xbt_log_layout_set(xbt_log_category_t cat,
325                                     xbt_log_layout_t lay);
326
327 /**
328  * \ingroup XBT_log_implem  
329  * \param cat the category (not only its name, but the variable)
330  * \param additivity whether logging actions must be passed to parent.
331  *
332  * Programatically sets whether the logging actions must be passed to 
333  * the parent category.
334  * (the prefered interface is throught xbt_log_control_set())
335  *
336  */
337 XBT_PUBLIC(void) xbt_log_additivity_set(xbt_log_category_t cat,
338                                         int additivity);
339
340 /** @brief create a new simple layout 
341  *
342  * This layout is not as flexible as the pattern one
343  */
344 XBT_PUBLIC(xbt_log_layout_t) xbt_log_layout_simple_new(char *arg);
345 XBT_PUBLIC(xbt_log_layout_t) xbt_log_layout_format_new(char *arg);
346 XBT_PUBLIC(xbt_log_appender_t) xbt_log_appender_file_new(char *arg);
347
348
349 /* ********************************** */
350 /* Functions that you shouldn't call  */
351 /* ********************************** */
352 XBT_PUBLIC(void) _xbt_log_event_log(xbt_log_event_t ev,
353                                     const char *fmt,
354                                     ...) _XBT_GNUC_PRINTF(2, 3);
355
356 XBT_PUBLIC(int) _xbt_log_cat_init(xbt_log_category_t category,
357                                   e_xbt_log_priority_t priority);
358
359
360 XBT_PUBLIC_DATA(s_xbt_log_category_t) _XBT_LOGV(XBT_LOG_ROOT_CAT);
361
362
363 extern xbt_log_appender_t xbt_log_default_appender;
364 extern xbt_log_layout_t xbt_log_default_layout;
365
366 /* ********************** */
367 /* Public functions again */
368 /* ********************** */
369
370 /**
371  * \ingroup XBT_log 
372  * \param catName name of the category
373  * \param priority minimal priority to be enabled to return true (must be #e_xbt_log_priority_t)
374  * \hideinitializer
375  *
376  * Returns true if the given priority is enabled for the category.
377  * If you have expensive expressions that are computed outside of the log
378  * command and used only within it, you should make its evaluation conditional
379  * using this macro.
380  */
381 #define XBT_LOG_ISENABLED(catName, priority) \
382             _XBT_LOG_ISENABLEDV(_XBT_LOGV(catName), priority)
383
384 /*
385  * Helper function that implements XBT_LOG_ISENABLED.
386  *
387  * NOTES
388  * First part is a compile-time constant.
389  * Call to xbt_log_cat_init only happens once.
390  */
391 #define _XBT_LOG_ISENABLEDV(catv, priority)                  \
392        (priority >= XBT_LOG_STATIC_THRESHOLD                 \
393         && (catv.initialized || _xbt_log_cat_init(&catv, priority)) \
394         && priority >= catv.threshold)
395
396 /*
397  * Internal Macros
398  * Some kludge macros to ease maintenance. See how they're used below.
399  *
400  * IMPLEMENTATION NOTE: To reduce the parameter passing overhead of an enabled
401  * message, the many parameters passed to the logging function are packed in a
402  * structure. Since these values will be usually be passed to at least 3
403  * functions, this is a win.
404  * It also allows adding new values (such as a timestamp) without breaking
405  * code. 
406  * Setting the LogEvent's valist member is done inside _log_logEvent.
407  */
408
409 /* Logging Macros */
410
411 #ifdef XBT_LOG_MAYDAY
412 # define XBT_CLOG(cat, prio, ...) \
413   _XBT_IF_ONE_ARG(_XBT_CLOG_ARG1, _XBT_CLOG_ARGN, __VA_ARGS__)(__VA_ARGS__)
414 # define _XBT_CLOG_ARG1(f) \
415   fprintf(stderr,"%s:%d:\n" f, __FILE__, __LINE__)
416 # define _XBT_CLOG_ARGN(f, ...) \
417   fprintf(stderr,"%s:%d:\n" f, __FILE__, __LINE__, __VA_ARGS__)
418 # define XBT_LOG(...) XBT_CLOG(0, __VA_ARGS__)
419 #else
420 # define XBT_CLOG_(catv, prio, ...)                                     \
421   do {                                                                  \
422     if (_XBT_LOG_ISENABLEDV(catv, prio)) {                              \
423       s_xbt_log_event_t _log_ev;                                        \
424       _log_ev.cat = &(catv);                                            \
425       _log_ev.priority = (prio);                                        \
426       _log_ev.fileName = __FILE__;                                      \
427       _log_ev.functionName = _XBT_FUNCTION;                             \
428       _log_ev.lineNum = __LINE__;                                       \
429       _xbt_log_event_log(&_log_ev, __VA_ARGS__);                        \
430     }                                                                   \
431   }  while (0)
432 # define XBT_CLOG(cat, prio, ...) XBT_CLOG_(_XBT_LOGV(cat), prio, __VA_ARGS__)
433 # define XBT_LOG(...) XBT_CLOG_((*_XBT_LOGV(default)), __VA_ARGS__)
434 #endif
435
436 /** @ingroup XBT_log
437  *  @hideinitializer
438  * \param c the category on which to log
439  * \param ... the format string and its arguments
440  *  @brief Log an event at the DEBUG priority on the specified category with these args.
441  */
442 #define XBT_CDEBUG(c, ...) XBT_CLOG(c, xbt_log_priority_debug, __VA_ARGS__)
443
444 /** @ingroup XBT_log
445  *  @hideinitializer
446  *  @brief Log an event at the VERB priority on the specified category with these args.
447  */
448 #define XBT_CVERB(c, ...) XBT_CLOG(c, xbt_log_priority_verbose, __VA_ARGS__)
449
450 /** @ingroup XBT_log
451  *  @hideinitializer
452  *  @brief Log an event at the INFO priority on the specified category with these args.
453  */
454 #define XBT_CINFO(c, ...) XBT_CLOG(c, xbt_log_priority_info, __VA_ARGS__)
455
456 /** @ingroup XBT_log
457  *  @hideinitializer
458  *  @brief Log an event at the WARN priority on the specified category with these args.
459  */
460 #define XBT_CWARN(c, ...) XBT_CLOG(c, xbt_log_priority_warning, __VA_ARGS__)
461
462 /** @ingroup XBT_log
463  *  @hideinitializer
464  *  @brief Log an event at the ERROR priority on the specified category with these args.
465  */
466 #define XBT_CERROR(c, ...) XBT_CLOG(c, xbt_log_priority_error, __VA_ARGS__)
467
468 /** @ingroup XBT_log
469  *  @hideinitializer
470  *  @brief Log an event at the CRITICAL priority on the specified category with these args (CCRITICALn exists for any n<10).
471  */
472 #define XBT_CCRITICAL(c, ...) XBT_CLOG(c, xbt_log_priority_critical, __VA_ARGS__)
473
474 /** @ingroup XBT_log
475  *  @hideinitializer
476  * \param ... the format string and its arguments
477  *  @brief Log an event at the DEBUG priority on the default category with these args.
478  */
479 #define XBT_DEBUG(...) XBT_LOG(xbt_log_priority_debug, __VA_ARGS__)
480
481 /** @ingroup XBT_log
482  *  @hideinitializer
483  *  @brief Log an event at the VERB priority on the default category with these args.
484  */
485 #define XBT_VERB(...) XBT_LOG(xbt_log_priority_verbose, __VA_ARGS__)
486
487 /** @ingroup XBT_log
488  *  @hideinitializer
489  *  @brief Log an event at the INFO priority on the default category with these args.
490  */
491 #define XBT_INFO(...) XBT_LOG(xbt_log_priority_info, __VA_ARGS__)
492
493 /** @ingroup XBT_log
494  *  @hideinitializer
495  *  @brief Log an event at the WARN priority on the default category with these args.
496  */
497 #define XBT_WARN(...) XBT_LOG(xbt_log_priority_warning, __VA_ARGS__)
498
499 /** @ingroup XBT_log
500  *  @hideinitializer
501  *  @brief Log an event at the ERROR priority on the default category with these args.
502  */
503 #define XBT_ERROR(...) XBT_LOG(xbt_log_priority_error, __VA_ARGS__)
504
505 /** @ingroup XBT_log
506  *  @hideinitializer
507  *  @brief Log an event at the CRITICAL priority on the default category with these args.
508  */
509 #define XBT_CRITICAL(...) XBT_LOG(xbt_log_priority_critical, __VA_ARGS__)
510
511 /** @ingroup XBT_log
512  *  @hideinitializer
513  *  @brief Log at TRACE priority that we entered in current function, appending a user specified format.
514  */
515 #define XBT_IN(...) \
516   _XBT_IF_ONE_ARG(_XBT_IN_ARG1, _XBT_IN_ARGN, __VA_ARGS__)(__VA_ARGS__)
517 #define _XBT_IN_ARG1(fmt) \
518   XBT_LOG(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION)
519 #define _XBT_IN_ARGN(fmt, ...) \
520   XBT_LOG(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, __VA_ARGS__)
521
522 /** @ingroup XBT_log
523  *  @hideinitializer
524  *  @brief Log at TRACE priority that we exited the current function.
525  */
526 #define XBT_OUT() XBT_LOG(xbt_log_priority_trace, "<< end of %s", _XBT_FUNCTION)
527
528 /** @ingroup XBT_log
529  *  @hideinitializer
530  *  @brief Log at TRACE priority a message indicating that we reached that point.
531  */
532 #define XBT_HERE() XBT_LOG(xbt_log_priority_trace, "-- was here")
533
534 #ifdef XBT_USE_DEPRECATED
535
536 /* Kept for backward compatibility. */
537
538 #define CLOG0(...) XBT_CLOG(__VA_ARGS__)
539 #define CLOG1(...) XBT_CLOG(__VA_ARGS__)
540 #define CLOG2(...) XBT_CLOG(__VA_ARGS__)
541 #define CLOG3(...) XBT_CLOG(__VA_ARGS__)
542 #define CLOG4(...) XBT_CLOG(__VA_ARGS__)
543 #define CLOG5(...) XBT_CLOG(__VA_ARGS__)
544 #define CLOG6(...) XBT_CLOG(__VA_ARGS__)
545 #define CLOG7(...) XBT_CLOG(__VA_ARGS__)
546 #define CLOG8(...) XBT_CLOG(__VA_ARGS__)
547 #define CLOG9(...) XBT_CLOG(__VA_ARGS__)
548 #define CLOG10(...) XBT_CLOG(__VA_ARGS__)
549
550 #define CDEBUG0(...) XBT_CDEBUG(__VA_ARGS__)
551 #define CDEBUG1(...) XBT_CDEBUG(__VA_ARGS__)
552 #define CDEBUG2(...) XBT_CDEBUG(__VA_ARGS__)
553 #define CDEBUG3(...) XBT_CDEBUG(__VA_ARGS__)
554 #define CDEBUG4(...) XBT_CDEBUG(__VA_ARGS__)
555 #define CDEBUG5(...) XBT_CDEBUG(__VA_ARGS__)
556 #define CDEBUG6(...) XBT_CDEBUG(__VA_ARGS__)
557 #define CDEBUG7(...) XBT_CDEBUG(__VA_ARGS__)
558 #define CDEBUG8(...) XBT_CDEBUG(__VA_ARGS__)
559 #define CDEBUG9(...) XBT_CDEBUG(__VA_ARGS__)
560 #define CDEBUG10(...) XBT_CDEBUG(__VA_ARGS__)
561
562 #define CVERB0(...) XBT_CVERB(__VA_ARGS__)
563 #define CVERB1(...) XBT_CVERB(__VA_ARGS__)
564 #define CVERB2(...) XBT_CVERB(__VA_ARGS__)
565 #define CVERB3(...) XBT_CVERB(__VA_ARGS__)
566 #define CVERB4(...) XBT_CVERB(__VA_ARGS__)
567 #define CVERB5(...) XBT_CVERB(__VA_ARGS__)
568 #define CVERB6(...) XBT_CVERB(__VA_ARGS__)
569 #define CVERB7(...) XBT_CVERB(__VA_ARGS__)
570 #define CVERB8(...) XBT_CVERB(__VA_ARGS__)
571 #define CVERB9(...) XBT_CVERB(__VA_ARGS__)
572 #define CVERB10(...) XBT_CVERB(__VA_ARGS__)
573
574 #define CINFO0(...) XBT_CINFO(__VA_ARGS__)
575 #define CINFO1(...) XBT_CINFO(__VA_ARGS__)
576 #define CINFO2(...) XBT_CINFO(__VA_ARGS__)
577 #define CINFO3(...) XBT_CINFO(__VA_ARGS__)
578 #define CINFO4(...) XBT_CINFO(__VA_ARGS__)
579 #define CINFO5(...) XBT_CINFO(__VA_ARGS__)
580 #define CINFO6(...) XBT_CINFO(__VA_ARGS__)
581 #define CINFO7(...) XBT_CINFO(__VA_ARGS__)
582 #define CINFO8(...) XBT_CINFO(__VA_ARGS__)
583 #define CINFO9(...) XBT_CINFO(__VA_ARGS__)
584 #define CINFO10(...) XBT_CINFO(__VA_ARGS__)
585
586 #define CWARN0(...) XBT_CWARN(__VA_ARGS__)
587 #define CWARN1(...) XBT_CWARN(__VA_ARGS__)
588 #define CWARN2(...) XBT_CWARN(__VA_ARGS__)
589 #define CWARN3(...) XBT_CWARN(__VA_ARGS__)
590 #define CWARN4(...) XBT_CWARN(__VA_ARGS__)
591 #define CWARN5(...) XBT_CWARN(__VA_ARGS__)
592 #define CWARN6(...) XBT_CWARN(__VA_ARGS__)
593 #define CWARN7(...) XBT_CWARN(__VA_ARGS__)
594 #define CWARN8(...) XBT_CWARN(__VA_ARGS__)
595 #define CWARN9(...) XBT_CWARN(__VA_ARGS__)
596 #define CWARN10(...) XBT_CWARN(__VA_ARGS__)
597
598 #define CERROR0(...) XBT_CERROR(__VA_ARGS__)
599 #define CERROR1(...) XBT_CERROR(__VA_ARGS__)
600 #define CERROR2(...) XBT_CERROR(__VA_ARGS__)
601 #define CERROR3(...) XBT_CERROR(__VA_ARGS__)
602 #define CERROR4(...) XBT_CERROR(__VA_ARGS__)
603 #define CERROR5(...) XBT_CERROR(__VA_ARGS__)
604 #define CERROR6(...) XBT_CERROR(__VA_ARGS__)
605 #define CERROR7(...) XBT_CERROR(__VA_ARGS__)
606 #define CERROR8(...) XBT_CERROR(__VA_ARGS__)
607 #define CERROR9(...) XBT_CERROR(__VA_ARGS__)
608 #define CERROR10(...) XBT_CERROR(__VA_ARGS__)
609
610 #define CCRITICAL0(...) XBT_CCRITICAL(__VA_ARGS__)
611 #define CCRITICAL1(...) XBT_CCRITICAL(__VA_ARGS__)
612 #define CCRITICAL2(...) XBT_CCRITICAL(__VA_ARGS__)
613 #define CCRITICAL3(...) XBT_CCRITICAL(__VA_ARGS__)
614 #define CCRITICAL4(...) XBT_CCRITICAL(__VA_ARGS__)
615 #define CCRITICAL5(...) XBT_CCRITICAL(__VA_ARGS__)
616 #define CCRITICAL6(...) XBT_CCRITICAL(__VA_ARGS__)
617 #define CCRITICAL7(...) XBT_CCRITICAL(__VA_ARGS__)
618 #define CCRITICAL8(...) XBT_CCRITICAL(__VA_ARGS__)
619 #define CCRITICAL9(...) XBT_CCRITICAL(__VA_ARGS__)
620 #define CCRITICAL10(...) XBT_CCRITICAL(__VA_ARGS__)
621
622 #define LOG0(...) XBT_LOG(__VA_ARGS__)
623 #define LOG1(...) XBT_LOG(__VA_ARGS__)
624 #define LOG2(...) XBT_LOG(__VA_ARGS__)
625 #define LOG3(...) XBT_LOG(__VA_ARGS__)
626 #define LOG4(...) XBT_LOG(__VA_ARGS__)
627 #define LOG5(...) XBT_LOG(__VA_ARGS__)
628 #define LOG6(...) XBT_LOG(__VA_ARGS__)
629 #define LOG7(...) XBT_LOG(__VA_ARGS__)
630 #define LOG8(...) XBT_LOG(__VA_ARGS__)
631 #define LOG9(...) XBT_LOG(__VA_ARGS__)
632 #define LOG10(...) XBT_LOG(__VA_ARGS__)
633
634 #define DEBUG0(...) XBT_DEBUG(__VA_ARGS__)
635 #define DEBUG1(...) XBT_DEBUG(__VA_ARGS__)
636 #define DEBUG2(...) XBT_DEBUG(__VA_ARGS__)
637 #define DEBUG3(...) XBT_DEBUG(__VA_ARGS__)
638 #define DEBUG4(...) XBT_DEBUG(__VA_ARGS__)
639 #define DEBUG5(...) XBT_DEBUG(__VA_ARGS__)
640 #define DEBUG6(...) XBT_DEBUG(__VA_ARGS__)
641 #define DEBUG7(...) XBT_DEBUG(__VA_ARGS__)
642 #define DEBUG8(...) XBT_DEBUG(__VA_ARGS__)
643 #define DEBUG9(...) XBT_DEBUG(__VA_ARGS__)
644 #define DEBUG10(...) XBT_DEBUG(__VA_ARGS__)
645
646 #define VERB0(...) XBT_VERB(__VA_ARGS__)
647 #define VERB1(...) XBT_VERB(__VA_ARGS__)
648 #define VERB2(...) XBT_VERB(__VA_ARGS__)
649 #define VERB3(...) XBT_VERB(__VA_ARGS__)
650 #define VERB4(...) XBT_VERB(__VA_ARGS__)
651 #define VERB5(...) XBT_VERB(__VA_ARGS__)
652 #define VERB6(...) XBT_VERB(__VA_ARGS__)
653 #define VERB7(...) XBT_VERB(__VA_ARGS__)
654 #define VERB8(...) XBT_VERB(__VA_ARGS__)
655 #define VERB9(...) XBT_VERB(__VA_ARGS__)
656 #define VERB10(...) XBT_VERB(__VA_ARGS__)
657
658 #define INFO0(...) XBT_INFO(__VA_ARGS__)
659 #define INFO1(...) XBT_INFO(__VA_ARGS__)
660 #define INFO2(...) XBT_INFO(__VA_ARGS__)
661 #define INFO3(...) XBT_INFO(__VA_ARGS__)
662 #define INFO4(...) XBT_INFO(__VA_ARGS__)
663 #define INFO5(...) XBT_INFO(__VA_ARGS__)
664 #define INFO6(...) XBT_INFO(__VA_ARGS__)
665 #define INFO7(...) XBT_INFO(__VA_ARGS__)
666 #define INFO8(...) XBT_INFO(__VA_ARGS__)
667 #define INFO9(...) XBT_INFO(__VA_ARGS__)
668 #define INFO10(...) XBT_INFO(__VA_ARGS__)
669
670 #define WARN0(...) XBT_WARN(__VA_ARGS__)
671 #define WARN1(...) XBT_WARN(__VA_ARGS__)
672 #define WARN2(...) XBT_WARN(__VA_ARGS__)
673 #define WARN3(...) XBT_WARN(__VA_ARGS__)
674 #define WARN4(...) XBT_WARN(__VA_ARGS__)
675 #define WARN5(...) XBT_WARN(__VA_ARGS__)
676 #define WARN6(...) XBT_WARN(__VA_ARGS__)
677 #define WARN7(...) XBT_WARN(__VA_ARGS__)
678 #define WARN8(...) XBT_WARN(__VA_ARGS__)
679 #define WARN9(...) XBT_WARN(__VA_ARGS__)
680 #define WARN10(...) XBT_WARN(__VA_ARGS__)
681
682 #define ERROR0(...) XBT_ERROR(__VA_ARGS__)
683 #define ERROR1(...) XBT_ERROR(__VA_ARGS__)
684 #define ERROR2(...) XBT_ERROR(__VA_ARGS__)
685 #define ERROR3(...) XBT_ERROR(__VA_ARGS__)
686 #define ERROR4(...) XBT_ERROR(__VA_ARGS__)
687 #define ERROR5(...) XBT_ERROR(__VA_ARGS__)
688 #define ERROR6(...) XBT_ERROR(__VA_ARGS__)
689 #define ERROR7(...) XBT_ERROR(__VA_ARGS__)
690 #define ERROR8(...) XBT_ERROR(__VA_ARGS__)
691 #define ERROR9(...) XBT_ERROR(__VA_ARGS__)
692 #define ERROR10(...) XBT_ERROR(__VA_ARGS__)
693
694 #define CRITICAL0(...) XBT_CRITICAL(__VA_ARGS__)
695 #define CRITICAL1(...) XBT_CRITICAL(__VA_ARGS__)
696 #define CRITICAL2(...) XBT_CRITICAL(__VA_ARGS__)
697 #define CRITICAL3(...) XBT_CRITICAL(__VA_ARGS__)
698 #define CRITICAL4(...) XBT_CRITICAL(__VA_ARGS__)
699 #define CRITICAL5(...) XBT_CRITICAL(__VA_ARGS__)
700 #define CRITICAL6(...) XBT_CRITICAL(__VA_ARGS__)
701 #define CRITICAL7(...) XBT_CRITICAL(__VA_ARGS__)
702 #define CRITICAL8(...) XBT_CRITICAL(__VA_ARGS__)
703 #define CRITICAL9(...) XBT_CRITICAL(__VA_ARGS__)
704 #define CRITICAL10(...) XBT_CRITICAL(__VA_ARGS__)
705
706 #define XBT_IN1(...) XBT_IN(__VA_ARGS__);
707 #define XBT_IN2(...) XBT_IN(__VA_ARGS__);
708 #define XBT_IN3(...) XBT_IN(__VA_ARGS__);
709 #define XBT_IN4(...) XBT_IN(__VA_ARGS__);
710 #define XBT_IN5(...) XBT_IN(__VA_ARGS__);
711 #define XBT_IN6(...) XBT_IN(__VA_ARGS__);
712
713 #endif
714
715 SG_END_DECL()
716 #endif                          /* ! _XBT_LOG_H_ */