Statistics
| Branch: | Revision:

ml / ml_log.h @ 11fce711

History | View | Annotate | Download (726 Bytes)

1
#ifndef _ML_LOG_H
2
#define _ML_LOG_H
3

    
4
#include <stdlib.h>
5
#include <stdio.h>
6
//#include "grapes_log.h"
7

    
8
#ifndef _GRAPES_LOG_H
9

    
10
#define debug(format, ... ) fprintf(stderr, format, ##__VA_ARGS__ )
11
/** Convenience macro to log LOG_INFO messages */
12
#define info(format, ... )  fprintf(stderr, format, ##__VA_ARGS__ )
13
/** Convenience macro to log LOG_WARN messages */
14
#define warn(format, ... )  fprintf(stderr, format, ##__VA_ARGS__ )
15
/** Convenience macro to log LOG_ERROR messages */
16
#define error(format, ... )  fprintf(stderr, format, ##__VA_ARGS__ )
17
/**  Convenience macro to log LOG_CRITICAL messages and crash the program */
18
#define fatal(format, ... )  { fprintf(stderr, format, ##__VA_ARGS__ ); exit(-1); }
19

    
20
#endif
21
#endif