mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-05-29 16:46:15 +00:00
Put debug and error messages in stderr.
This commit is contained in:
@@ -29,13 +29,13 @@
|
|||||||
// Useful macros
|
// Useful macros
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// #define DBG(x, args...) printf("DBG %s:%d: " x "\n", __FILE__, __LINE__,## args )
|
// #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
|
#else
|
||||||
#define DBG(...) {}
|
#define DBG(...) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INFO(x, ...) printf("INFO: " x "\n", ## __VA_ARGS__ )
|
#define INFO(x, ...) printf("INFO: " x "\n", ## __VA_ARGS__ )
|
||||||
#define WARN(x, ...) printf("WARNING: " 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_
|
#endif // _LIBNFC_MESSAGES_H_
|
||||||
|
|||||||
Reference in New Issue
Block a user