Logo AND Algorithmique Numérique Distribuée

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