Logo AND Algorithmique Numérique Distribuée

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