From 91aceadf4f2d19d8f1e96e67eaffda510c514dd9 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Tue, 20 Oct 2009 15:36:22 +0000 Subject: [PATCH] Put debug and error messages in stderr. --- src/messages.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/messages.h b/src/messages.h index ec625b6..bd952c7 100644 --- a/src/messages.h +++ b/src/messages.h @@ -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_