From bc6bd8a2b8b84a79dd77b81d6a25b661c5d1d1ca Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 16 Dec 2018 14:14:41 +0100 Subject: Add optional debugging code Compile *without* -DNDEBUG. The environment variable PIANOBAR_DEBUG accepts a bitfield which enables (1) network (2) audio (4) UI debug messages. --- src/config.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h index 48a4cfe..4580f43 100644 --- a/src/config.h +++ b/src/config.h @@ -42,3 +42,10 @@ #define HAVE_AV_REGISTER_ALL #endif +#ifndef NDEBUG +#define HAVE_DEBUGLOG +#define debug(...) fprintf(stderr, __VA_ARGS__) +#else +#define debug(...) +#endif + -- cgit v1.2.3