Logo AND Algorithmique Numérique Distribuée

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