diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2018-12-16 14:14:41 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2020-08-09 08:42:11 +0200 |
commit | bc6bd8a2b8b84a79dd77b81d6a25b661c5d1d1ca (patch) | |
tree | 3013cbf73ea3374d9974d251e11da87be7d1276b /src/ui.c | |
parent | 7f6457aa9b7110869e89111c42651b1055728679 (diff) | |
download | pianobar-bc6bd8a2b8b84a79dd77b81d6a25b661c5d1d1ca.tar.gz pianobar-bc6bd8a2b8b84a79dd77b81d6a25b661c5d1d1ca.tar.bz2 pianobar-bc6bd8a2b8b84a79dd77b81d6a25b661c5d1d1ca.zip |
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.
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -40,6 +40,7 @@ THE SOFTWARE. #include <sys/wait.h> #include "ui.h" +#include "debug.h" #include "ui_readline.h" typedef int (*BarSortFunc_t) (const void *, const void *); @@ -189,6 +190,7 @@ static CURLcode BarPianoHttpRequest (CURL * const http, req->secure ? settings->rpcTlsPort : "80", req->urlPath); assert (ret >= 0 && ret <= (int) sizeof (url)); + debugPrint (DEBUG_NETWORK, "← %s\n", url); /* save the previous interrupt destination */ prevint = interrupted; @@ -261,6 +263,7 @@ static CURLcode BarPianoHttpRequest (CURL * const http, curl_slist_free_all (list); req->responseData = buffer.data; + debugPrint (DEBUG_NETWORK, "→ %s\n", req->responseData); interrupted = prevint; |