Put debug and error messages in stderr.
This commit is contained in:
parent
4a03864bea
commit
91aceadf4f
1 changed files with 2 additions and 2 deletions
|
@ -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_
|
||||
|
|
Loading…
Reference in a new issue