Revision 11fce711 ml_log.h

View differences:

ml_log.h
3 3

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

  
8 8
#ifndef _GRAPES_LOG_H
9 9

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

  
20 20
#endif
21 21
#endif

Also available in: Unified diff