Logo AND Algorithmique Numérique Distribuée

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