Logo AND Algorithmique Numérique Distribuée

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