Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
C++ needs love
[simgrid.git] / include / xbt / log.h
1 /* $Id$ */
2
3 /* log - a generic logging facility in the spirit of log4j                  */
4
5 /* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved.            */
6
7 /* This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. */
9
10 /** @addtogroup XBT_log
11  *  @brief A generic logging facility in the spirit of log4j (grounding feature)
12  *
13  *
14  */
15
16 /** \defgroup XBT_log_cats Existing log categories
17  *  \ingroup XBT_log
18  *  \brief (automatically extracted) 
19  *     
20  *  This is the list of all existing log categories in SimGrid.
21  *  This list was automatically extracted from the source code by
22  *  the src/xbt_log_extract_hierarchy utility.
23  *     
24  *  You can thus be certain that it is uptodate, but it may somehow
25  *  lack a final manual touch.
26  *  Anyway, nothing's perfect ;)
27  */
28
29 /* XBT_LOG_MAYDAY: define this to replace the logging facilities with basic
30    printf function. Useful to debug the logging facilities themselves */
31 #undef XBT_LOG_MAYDAY
32 /*#define XBT_LOG_MAYDAY*/
33
34 #ifndef _XBT_LOG_H_
35 #define _XBT_LOG_H_
36
37 #include "xbt/misc.h"
38
39 #include <stdarg.h>
40 SG_BEGIN_DECL()
41 /**\brief Log priorities
42  * \ingroup XBT_log
43  *
44  * The different existing priorities.
45 */
46      typedef enum {
47        xbt_log_priority_none = 0,       /* used internally (don't poke with) */
48        xbt_log_priority_trace = 1,     /**< enter and return of some functions */
49        xbt_log_priority_debug = 2,     /**< crufty output  */
50        xbt_log_priority_verbose = 3,   /**< verbose output for the user wanting more */
51        xbt_log_priority_info = 4,      /**< output about the regular functionning */
52        xbt_log_priority_warning = 5,   /**< minor issue encountered */
53        xbt_log_priority_error = 6,     /**< issue encountered */
54        xbt_log_priority_critical = 7,  /**< major issue encountered */
55
56        xbt_log_priority_infinite = 8,  /**< value for XBT_LOG_STATIC_THRESHOLD to not log */
57
58        xbt_log_priority_uninitialized = -1      /* used internally (don't poke with) */
59      } e_xbt_log_priority_t;
60
61
62 /*
63  * define NLOG to disable at compilation time any logging request
64  * define NDEBUG to disable at compilation time any logging request of priority below INFO
65  */
66
67
68 /**
69  * @def XBT_LOG_STATIC_THRESHOLD
70  * @ingroup XBT_log
71  *
72  * All logging requests with priority < XBT_LOG_STATIC_THRESHOLD are disabled at
73  * compile time, i.e., compiled out.
74  */
75 #ifdef NLOG
76 #  define XBT_LOG_STATIC_THRESHOLD xbt_log_priority_infinite
77 #else
78
79 #  ifdef NDEBUG
80 #    define XBT_LOG_STATIC_THRESHOLD xbt_log_priority_verbose
81 #  else /* !NLOG && !NDEBUG */
82
83 #    ifndef XBT_LOG_STATIC_THRESHOLD
84 #      define XBT_LOG_STATIC_THRESHOLD xbt_log_priority_none
85 #    endif /* !XBT_LOG_STATIC_THRESHOLD */
86 #  endif /* NDEBUG */
87 #endif /* !defined(NLOG) */
88
89 /* Transforms a category name to a global variable name. */
90 #define _XBT_LOGV(cat)   _XBT_LOG_CONCAT(_simgrid_log_category__, cat)
91 #define _XBT_LOG_CONCAT(x,y) x ## y
92
93 /* The root of the category hierarchy. */
94 #define XBT_LOG_ROOT_CAT   root
95
96 /* In stric ansi C, we are not allowed to initialize a variable with 
97  * a non-constant value. But the whole tree of categories is
98  * connected by setting the address of the parent category as a field
99  * of the child one.
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(__STRICT_ANSI__) || 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 (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 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 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 WIN32
393 #define _XBT_LOG_PRE(catv, priority) do {                        \
394      if (_XBT_LOG_ISENABLEDV(catv, priority)) {                  \
395          s_xbt_log_event_t _log_ev =                             \
396              {NULL,priority,__FILE__,_XBT_FUNCTION,__LINE__}; \
397                 _log_ev.cat = &(catv);                           \
398                                 _log_ev.buffer = (char*) calloc(XBT_LOG_BUFF_SIZE + 1, sizeof(char)); \
399               _xbt_log_event_log(&_log_ev
400 #else
401 #define _XBT_LOG_PRE(catv, priority) do {                        \
402      if (_XBT_LOG_ISENABLEDV(catv, priority)) {                  \
403          s_xbt_log_event_t _log_ev =                             \
404              {NULL,priority,__FILE__,_XBT_FUNCTION,__LINE__}; \
405                 _log_ev.cat = &(catv);                           \
406               _xbt_log_event_log(&_log_ev                        \
407
408 #endif
409
410 #define _XBT_LOG_POST                          \
411                         );                      \
412      } } while(0)
413
414
415 /* Logging Macros */
416
417 #ifdef XBT_LOG_MAYDAY
418 # define CLOG0(c, p, f)                   fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__)
419 # define CLOG1(c, p, f,a1)                fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1)
420 # define CLOG2(c, p, f,a1,a2)             fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2)
421 # define CLOG3(c, p, f,a1,a2,a3)          fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3)
422 # define CLOG4(c, p, f,a1,a2,a3,a4)       fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4)
423 # define CLOG5(c, p, f,a1,a2,a3,a4,a5)    fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5)
424 # define CLOG6(c, p, f,a1,a2,a3,a4,a5,a6) fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5,a6)
425 # define CLOG7(c, p, f,a1,a2,a3,a4,a5,a6,a7) fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5,a6,a7)
426 # define CLOG8(c, p, f,a1,a2,a3,a4,a5,a6,a7,a8) fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5,a6,a7,a8)
427 # define CLOG9(c, p, f,a1,a2,a3,a4,a5,a6,a7,a8,a9) fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5,a6,a7,a8,a9)
428 # define CLOG10(c, p, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
429 #else
430 # define CLOG0(c, p, f)                   _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f _XBT_LOG_POST
431 # define CLOG1(c, p, f,a1)                _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f,a1 _XBT_LOG_POST
432 # define CLOG2(c, p, f,a1,a2)             _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f,a1,a2 _XBT_LOG_POST
433 # define CLOG3(c, p, f,a1,a2,a3)          _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f,a1,a2,a3 _XBT_LOG_POST
434 # define CLOG4(c, p, f,a1,a2,a3,a4)       _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f,a1,a2,a3,a4 _XBT_LOG_POST
435 # define CLOG5(c, p, f,a1,a2,a3,a4,a5)    _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f,a1,a2,a3,a4,a5 _XBT_LOG_POST
436 # define CLOG6(c, p, f,a1,a2,a3,a4,a5,a6) _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f,a1,a2,a3,a4,a5,a6 _XBT_LOG_POST
437 # define CLOG7(c, p, f,a1,a2,a3,a4,a5,a6,a7) _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f,a1,a2,a3,a4,a5,a6,a7 _XBT_LOG_POST
438 # define CLOG8(c, p, f,a1,a2,a3,a4,a5,a6,a7,a8) _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f,a1,a2,a3,a4,a5,a6,a7,a8 _XBT_LOG_POST
439 # define CLOG9(c, p, f,a1,a2,a3,a4,a5,a6,a7,a8,a9) _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f,a1,a2,a3,a4,a5,a6,a7,a8,a9 _XBT_LOG_POST
440 # define CLOG10(c, p, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) _XBT_LOG_PRE(_XBT_LOGV(c),p) ,f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 _XBT_LOG_POST
441 #endif
442 #define CDEBUG0(c, f)                   CLOG0(c, xbt_log_priority_debug, f)
443 #define CDEBUG1(c, f,a1)                CLOG1(c, xbt_log_priority_debug, f,a1)
444 #define CDEBUG2(c, f,a1,a2)             CLOG2(c, xbt_log_priority_debug, f,a1,a2)
445 #define CDEBUG3(c, f,a1,a2,a3)          CLOG3(c, xbt_log_priority_debug, f,a1,a2,a3)
446 #define CDEBUG4(c, f,a1,a2,a3,a4)       CLOG4(c, xbt_log_priority_debug, f,a1,a2,a3,a4)
447 #define CDEBUG5(c, f,a1,a2,a3,a4,a5)    CLOG5(c, xbt_log_priority_debug, f,a1,a2,a3,a4,a5)
448 #define CDEBUG6(c, f,a1,a2,a3,a4,a5,a6) CLOG6(c, xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6)
449 #define CDEBUG7(c, f,a1,a2,a3,a4,a5,a6,a7) CLOG7(c, xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7)
450 #define CDEBUG8(c, f,a1,a2,a3,a4,a5,a6,a7,a8) CLOG8(c, xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7,a8)
451 #define CDEBUG9(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9) CLOG9(c, xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
452 /** @ingroup XBT_log
453  *  @hideinitializer
454  * \param c the category on which to log
455  * \param f the format string
456  * \param a1 first argument of the format
457  * \param a2 second argument of the format
458  * \param a3 third argument of the format
459  * \param a4 fourth argument of the format
460  * \param a5 fifth argument of the format
461  * \param a6 sixth argument of the format
462  * \param a7 seventh argument of the format
463  * \param a8 eighth argument of the format
464  * \param a9 ninth argument of the format
465  * \param a10 tenth argument of the format
466  *  @brief Log an event at the DEBUG priority on the specified category with these args (CDEBUGn exists for any n<10).
467  */
468 #define CDEBUG10(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) CLOG10(c, xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
469
470 #define CVERB0(c, f)                   CLOG0(c, xbt_log_priority_verbose, f)
471 #define CVERB1(c, f,a1)                CLOG1(c, xbt_log_priority_verbose, f,a1)
472 #define CVERB2(c, f,a1,a2)             CLOG2(c, xbt_log_priority_verbose, f,a1,a2)
473 #define CVERB3(c, f,a1,a2,a3)          CLOG3(c, xbt_log_priority_verbose, f,a1,a2,a3)
474 #define CVERB4(c, f,a1,a2,a3,a4)       CLOG4(c, xbt_log_priority_verbose, f,a1,a2,a3,a4)
475 #define CVERB5(c, f,a1,a2,a3,a4,a5)    CLOG5(c, xbt_log_priority_verbose, f,a1,a2,a3,a4,a5)
476 #define CVERB6(c, f,a1,a2,a3,a4,a5,a6)    CLOG6(c, xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6)
477 #define CVERB7(c, f,a1,a2,a3,a4,a5,a6,a7)    CLOG7(c, xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6,a7)
478 #define CVERB8(c, f,a1,a2,a3,a4,a5,a6,a7,a8)    CLOG8(c, xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6,a7,a8)
479 #define CVERB9(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)    CLOG9(c, xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
480 /** @ingroup XBT_log
481  *  @hideinitializer
482  *  @brief Log an event at the VERB priority on the specified category with these args (CVERBn exists for any n<10).
483  */
484 #define CVERB10(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)    CLOG10(c, xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
485
486 #define CINFO0(c, f)                   CLOG0(c, xbt_log_priority_info, f)
487 #define CINFO1(c, f,a1)                CLOG1(c, xbt_log_priority_info, f,a1)
488 #define CINFO2(c, f,a1,a2)             CLOG2(c, xbt_log_priority_info, f,a1,a2)
489 #define CINFO3(c, f,a1,a2,a3)          CLOG3(c, xbt_log_priority_info, f,a1,a2,a3)
490 #define CINFO4(c, f,a1,a2,a3,a4)       CLOG4(c, xbt_log_priority_info, f,a1,a2,a3,a4)
491 #define CINFO5(c, f,a1,a2,a3,a4,a5)    CLOG5(c, xbt_log_priority_info, f,a1,a2,a3,a4,a5)
492 #define CINFO6(c, f,a1,a2,a3,a4,a5,a6) CLOG6(c, xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6)
493 #define CINFO7(c, f,a1,a2,a3,a4,a5,a6,a7) CLOG7(c, xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6,a7)
494 #define CINFO8(c, f,a1,a2,a3,a4,a5,a6,a7,a8) CLOG8(c, xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6,a7,a8)
495 #define CINFO9(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9) CLOG9(c, xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
496 /** @ingroup XBT_log
497  *  @hideinitializer
498  *  @brief Log an event at the INFO priority on the specified category with these args (CINFOn exists for any n<10).
499  */
500 #define CINFO10(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) CLOG10(c, xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
501
502 #define CWARN0(c, f)                   CLOG0(c, xbt_log_priority_warning, f)
503 #define CWARN1(c, f,a1)                CLOG1(c, xbt_log_priority_warning, f,a1)
504 #define CWARN2(c, f,a1,a2)             CLOG2(c, xbt_log_priority_warning, f,a1,a2)
505 #define CWARN3(c, f,a1,a2,a3)          CLOG3(c, xbt_log_priority_warning, f,a1,a2,a3)
506 #define CWARN4(c, f,a1,a2,a3,a4)       CLOG4(c, xbt_log_priority_warning, f,a1,a2,a3,a4)
507 #define CWARN5(c, f,a1,a2,a3,a4,a5)    CLOG5(c, xbt_log_priority_warning, f,a1,a2,a3,a4,a5)
508 #define CWARN6(c, f,a1,a2,a3,a4,a5,a6) CLOG6(c, xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6)
509 #define CWARN7(c, f,a1,a2,a3,a4,a5,a6,a7) CLOG7(c, xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6,a7)
510 #define CWARN8(c, f,a1,a2,a3,a4,a5,a6,a7,a8) CLOG8(c, xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6,a7,a8)
511 #define CWARN9(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9) CLOG9(c, xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
512 /** @ingroup XBT_log
513  *  @hideinitializer
514  *  @brief Log an event at the WARN priority on the specified category with these args (CWARNn exists for any n<10).
515  */
516 #define CWARN10(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) CLOG10(c, xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,10)
517
518 #define CERROR0(c, f)                   CLOG0(c, xbt_log_priority_error, f)
519 #define CERROR1(c, f,a1)                CLOG1(c, xbt_log_priority_error, f,a1)
520 #define CERROR2(c, f,a1,a2)             CLOG2(c, xbt_log_priority_error, f,a1,a2)
521 #define CERROR3(c, f,a1,a2,a3)          CLOG3(c, xbt_log_priority_error, f,a1,a2,a3)
522 #define CERROR4(c, f,a1,a2,a3,a4)       CLOG4(c, xbt_log_priority_error, f,a1,a2,a3,a4)
523 #define CERROR5(c, f,a1,a2,a3,a4,a5)    CLOG5(c, xbt_log_priority_error, f,a1,a2,a3,a4,a5)
524 #define CERROR6(c, f,a1,a2,a3,a4,a5,a6) CLOG6(c, xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6)
525 #define CERROR7(c, f,a1,a2,a3,a4,a5,a6,a7) CLOG7(c, xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6,a7)
526 #define CERROR8(c, f,a1,a2,a3,a4,a5,a6,a7,a8) CLOG8(c, xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6,a7,a8)
527 #define CERROR9(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9) CLOG9(c, xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
528 /** @ingroup XBT_log
529  *  @hideinitializer
530  *  @brief Log an event at the ERROR priority on the specified category with these args (CERRORn exists for any n<10).
531  */
532 #define CERROR10(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) CLOG10(c, xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
533
534 #define CCRITICAL0(c, f)                   CLOG0(c, xbt_log_priority_critical, f)
535 #define CCRITICAL1(c, f,a1)                CLOG1(c, xbt_log_priority_critical, f,a1)
536 #define CCRITICAL2(c, f,a1,a2)             CLOG2(c, xbt_log_priority_critical, f,a1,a2)
537 #define CCRITICAL3(c, f,a1,a2,a3)          CLOG3(c, xbt_log_priority_critical, f,a1,a2,a3)
538 #define CCRITICAL4(c, f,a1,a2,a3,a4)       CLOG4(c, xbt_log_priority_critical, f,a1,a2,a3,a4)
539 #define CCRITICAL5(c, f,a1,a2,a3,a4,a5)    CLOG5(c, xbt_log_priority_critical, f,a1,a2,a3,a4,a5)
540 #define CCRITICAL6(c, f,a1,a2,a3,a4,a5,a6)    CLOG6(c, xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6)
541 #define CCRITICAL7(c, f,a1,a2,a3,a4,a5,a6,a7)    CLOG7(c, xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6,a7)
542 #define CCRITICAL8(c, f,a1,a2,a3,a4,a5,a6,a7,a8)    CLOG8(c, xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6,a7,a8)
543 #define CCRITICAL9(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)    CLOG9(c, xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
544 /** @ingroup XBT_log
545  *  @hideinitializer
546  *  @brief Log an event at the CRITICAL priority on the specified category with these args (CCRITICALn exists for any n<10).
547  */
548 #define CCRITICAL10(c, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)    CLOG10(c, xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
549
550 #ifdef XBT_LOG_MAYDAY
551 # define LOG0(p, f)                   fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__)
552 # define LOG1(p, f,a1)                fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1)
553 # define LOG2(p, f,a1,a2)             fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2)
554 # define LOG3(p, f,a1,a2,a3)          fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3)
555 # define LOG4(p, f,a1,a2,a3,a4)       fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4)
556 # define LOG5(p, f,a1,a2,a3,a4,a5)    fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5)
557 # define LOG6(p, f,a1,a2,a3,a4,a5,a6) fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5,a6)
558 # define LOG7(p, f,a1,a2,a3,a4,a5,a6,a7) fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5,a6,a7)
559 # define LOG8(p, f,a1,a2,a3,a4,a5,a6,a7,a8) fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5,a6,a7,a8)
560 # define LOG9(p, f,a1,a2,a3,a4,a5,a6,a7,a8,a9) fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5,a6,a7,a8,a9)
561 # define LOG10(p, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) fprintf(stderr,"%s:%d:" f "\n",__FILE__,__LINE__,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
562 #else
563 # define LOG0(p, f)                   _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f _XBT_LOG_POST
564 # define LOG1(p, f,a1)                _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f,a1 _XBT_LOG_POST
565 # define LOG2(p, f,a1,a2)             _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f,a1,a2 _XBT_LOG_POST
566 # define LOG3(p, f,a1,a2,a3)          _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f,a1,a2,a3 _XBT_LOG_POST
567 # define LOG4(p, f,a1,a2,a3,a4)       _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f,a1,a2,a3,a4 _XBT_LOG_POST
568 # define LOG5(p, f,a1,a2,a3,a4,a5)    _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f,a1,a2,a3,a4,a5 _XBT_LOG_POST
569 # define LOG6(p, f,a1,a2,a3,a4,a5,a6) _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f,a1,a2,a3,a4,a5,a6 _XBT_LOG_POST
570 # define LOG7(p, f,a1,a2,a3,a4,a5,a6,a7) _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f,a1,a2,a3,a4,a5,a6,a7 _XBT_LOG_POST
571 # define LOG8(p, f,a1,a2,a3,a4,a5,a6,a7,a8) _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f,a1,a2,a3,a4,a5,a6,a7,a8 _XBT_LOG_POST
572 # define LOG9(p, f,a1,a2,a3,a4,a5,a6,a7,a8,a9) _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f,a1,a2,a3,a4,a5,a6,a7,a8,a9 _XBT_LOG_POST
573 # define LOG10(p,f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) _XBT_LOG_PRE((*_XBT_LOGV(default)),p) ,f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 _XBT_LOG_POST
574 #endif
575
576 #define DEBUG0(f)                   LOG0(xbt_log_priority_debug, f)
577 #define DEBUG1(f,a1)                LOG1(xbt_log_priority_debug, f,a1)
578 #define DEBUG2(f,a1,a2)             LOG2(xbt_log_priority_debug, f,a1,a2)
579 #define DEBUG3(f,a1,a2,a3)          LOG3(xbt_log_priority_debug, f,a1,a2,a3)
580 #define DEBUG4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_debug, f,a1,a2,a3,a4)
581 #define DEBUG5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_debug, f,a1,a2,a3,a4,a5)
582 #define DEBUG6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6)
583 #define DEBUG7(f,a1,a2,a3,a4,a5,a6,a7) LOG7(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7)
584 #define DEBUG8(f,a1,a2,a3,a4,a5,a6,a7,a8) LOG8(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7,a8)
585 #define DEBUG9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9) LOG9(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
586 /** @ingroup XBT_log
587  *  @hideinitializer
588  * \param f the format string
589  * \param a1 first argument of the format
590  * \param a2 second argument of the format
591  * \param a3 third argument of the format
592  * \param a4 fourth argument of the format
593  * \param a5 fifth argument of the format
594  * \param a6 sixth argument of the format
595  * \param a7 seventh argument of the format
596  * \param a8 eighth argument of the format
597  * \param a9 ninth argument of the format
598  * \param a10 tenth argument of the format
599  *  @brief Log an event at the DEBUG priority on the default category with these args (DEBUGn exists for any n<10)
600  */
601 #define DEBUG10(f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) LOG10(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
602
603 #define VERB0(f)                   LOG0(xbt_log_priority_verbose, f)
604 #define VERB1(f,a1)                LOG1(xbt_log_priority_verbose, f,a1)
605 #define VERB2(f,a1,a2)             LOG2(xbt_log_priority_verbose, f,a1,a2)
606 #define VERB3(f,a1,a2,a3)          LOG3(xbt_log_priority_verbose, f,a1,a2,a3)
607 #define VERB4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_verbose, f,a1,a2,a3,a4)
608 #define VERB5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5)
609 #define VERB6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6)
610 #define VERB7(f,a1,a2,a3,a4,a5,a6,a7) LOG7(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6,a7)
611 #define VERB8(f,a1,a2,a3,a4,a5,a6,a7,a8) LOG8(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6,a7,a8)
612 #define VERB9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9) LOG9(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
613 /** @ingroup XBT_log
614  *  @hideinitializer
615  *  @brief Log an event at the VERB priority on the default category with these args (VERBn exists for any n<10).
616  */
617 #define VERB10(f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) LOG10(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
618
619 #define INFO0(f)                   LOG0(xbt_log_priority_info, f)
620 #define INFO1(f,a1)                LOG1(xbt_log_priority_info, f,a1)
621 #define INFO2(f,a1,a2)             LOG2(xbt_log_priority_info, f,a1,a2)
622 #define INFO3(f,a1,a2,a3)          LOG3(xbt_log_priority_info, f,a1,a2,a3)
623 #define INFO4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_info, f,a1,a2,a3,a4)
624 #define INFO5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_info, f,a1,a2,a3,a4,a5)
625 #define INFO6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6)
626 #define INFO7(f,a1,a2,a3,a4,a5,a6,a7) LOG7(xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6,a7)
627 #define INFO8(f,a1,a2,a3,a4,a5,a6,a7,a8) LOG8(xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6,a7,a8)
628 #define INFO9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9) LOG9(xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
629 /** @ingroup XBT_log
630  *  @hideinitializer
631  *  @brief Log an event at the INFO priority on the default category with these args (INFOn exists for any n<10).
632  */
633 #define INFO10(f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) LOG10(xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
634
635 #define WARN0(f)                   LOG0(xbt_log_priority_warning, f)
636 #define WARN1(f,a1)                LOG1(xbt_log_priority_warning, f,a1)
637 #define WARN2(f,a1,a2)             LOG2(xbt_log_priority_warning, f,a1,a2)
638 #define WARN3(f,a1,a2,a3)          LOG3(xbt_log_priority_warning, f,a1,a2,a3)
639 #define WARN4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_warning, f,a1,a2,a3,a4)
640 #define WARN5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_warning, f,a1,a2,a3,a4,a5)
641 #define WARN6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6)
642 #define WARN7(f,a1,a2,a3,a4,a5,a6,a7) LOG7(xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6,a7)
643 #define WARN8(f,a1,a2,a3,a4,a5,a6,a7,a8) LOG8(xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6,a7,a8)
644 #define WARN9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9) LOG9(xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
645 /** @ingroup XBT_log
646  *  @hideinitializer
647  *  @brief Log an event at the WARN priority on the default category with these args (WARNn exists for any n<10).
648  */
649 #define WARN10(f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) LOG10(xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
650
651
652 #define ERROR0(f)                   LOG0(xbt_log_priority_error, f)
653 #define ERROR1(f,a1)                LOG1(xbt_log_priority_error, f,a1)
654 #define ERROR2(f,a1,a2)             LOG2(xbt_log_priority_error, f,a1,a2)
655 #define ERROR3(f,a1,a2,a3)          LOG3(xbt_log_priority_error, f,a1,a2,a3)
656 #define ERROR4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_error, f,a1,a2,a3,a4)
657 #define ERROR5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_error, f,a1,a2,a3,a4,a5)
658 #define ERROR6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6)
659 #define ERROR7(f,a1,a2,a3,a4,a5,a6,a7) LOG7(xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6,a7)
660 #define ERROR8(f,a1,a2,a3,a4,a5,a6,a7,a8) LOG8(xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6,a7,a8)
661 #define ERROR9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9) LOG9(xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
662 /** @ingroup XBT_log
663  *  @hideinitializer
664  *  @brief Log an event at the ERROR priority on the default category with these args (ERRORn exists for any n<10).
665  */
666 #define ERROR10(f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) LOG10(xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
667
668 #define CRITICAL0(f)                   LOG0(xbt_log_priority_critical, f)
669 #define CRITICAL1(f,a1)                LOG1(xbt_log_priority_critical, f,a1)
670 #define CRITICAL2(f,a1,a2)             LOG2(xbt_log_priority_critical, f,a1,a2)
671 #define CRITICAL3(f,a1,a2,a3)          LOG3(xbt_log_priority_critical, f,a1,a2,a3)
672 #define CRITICAL4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_critical, f,a1,a2,a3,a4)
673 #define CRITICAL5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_critical, f,a1,a2,a3,a4,a5)
674 #define CRITICAL6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6)
675 #define CRITICAL7(f,a1,a2,a3,a4,a5,a6,a7) LOG7(xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6,a7)
676 #define CRITICAL8(f,a1,a2,a3,a4,a5,a6,a7,a8) LOG8(xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6,a7,a8)
677 #define CRITICAL9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9) LOG9(xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6,a7,a8,a9)
678 /** @ingroup XBT_log
679  *  @hideinitializer
680  *  @brief Log an event at the CRITICAL priority on the default category with these args (CRITICALn exists for any n<10).
681  */
682 #define CRITICAL10(f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) LOG10(xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
683
684 /** @ingroup XBT_log
685  *  @hideinitializer
686  *  @brief Log at TRACE priority that we entered in current function.
687  */
688 #define XBT_IN               LOG1(xbt_log_priority_trace, ">> begin of %s",     _XBT_FUNCTION)
689 #define XBT_IN1(fmt,a)       LOG2(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, a)
690 #define XBT_IN2(fmt,a,b)     LOG3(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, a,b)
691 #define XBT_IN3(fmt,a,b,c)   LOG4(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, a,b,c)
692 #define XBT_IN4(fmt,a,b,c,d) LOG5(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, a,b,c,d)
693 /** @ingroup XBT_log
694  *  @hideinitializer
695  *  @brief Log at TRACE priority that we entered in current function, appending a user specified format taking 5 args (XBT_INn exists for all n in [1,6])
696  */
697 #define XBT_IN5(fmt,a,b,c,d,e) LOG6(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_FUNCTION, a,b,c,d,e)
698 /** @ingroup XBT_log
699  *  @hideinitializer
700  *  @brief Log at TRACE priority that we exited the current function.
701  */
702 #define XBT_OUT              LOG1(xbt_log_priority_trace, "<< end of %s",       _XBT_FUNCTION)
703 /** @ingroup XBT_log
704  *  @hideinitializer
705  *  @brief Log at TRACE priority a message indicating that we reached that point.
706  */
707 #define XBT_HERE             LOG0(xbt_log_priority_trace, "-- was here")
708
709
710 SG_END_DECL()
711 #endif /* ! _XBT_LOG_H_ */