Put debug and error messages in stderr.

This commit is contained in:
Romuald Conty 2009-10-20 15:36:22 +00:00
parent 4a03864bea
commit 91aceadf4f

View file

@ -29,13 +29,13 @@
// Useful macros
#ifdef DEBUG
// #define DBG(x, args...) printf("DBG %s:%d: " x "\n", __FILE__, __LINE__,## args )
#define DBG(x, ...) printf("DBG %s:%d: " x "\n", __FILE__, __LINE__, ## __VA_ARGS__ )
#define DBG(x, ...) fprintf(stderr, "DBG %s:%d: " x "\n", __FILE__, __LINE__, ## __VA_ARGS__ )
#else
#define DBG(...) {}
#endif
#define INFO(x, ...) printf("INFO: " x "\n", ## __VA_ARGS__ )
#define WARN(x, ...) printf("WARNING: " x "\n", ## __VA_ARGS__ )
#define ERR(x, ...) printf("ERROR: " x "\n", ## __VA_ARGS__ )
#define ERR(x, ...) fprintf(stderr, "ERROR: " x "\n", ## __VA_ARGS__ )
#endif // _LIBNFC_MESSAGES_H_