From e1c9854deaab5f4745c735310c558208f574eca6 Mon Sep 17 00:00:00 2001 From: jcorporation Date: Wed, 22 Aug 2018 17:39:46 +0100 Subject: [PATCH] Fix: improved debug output --- src/mpd_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mpd_client.c b/src/mpd_client.c index 11823e1..f2a8e52 100644 --- a/src/mpd_client.c +++ b/src/mpd_client.c @@ -515,13 +515,13 @@ void callback_mympd(struct mg_connection *nc, const struct mg_str msg) { if (is_websocket(nc)) { #ifdef DEBUG - fprintf(stdout, "Send websocket response:\n %s\n", mpd.buf); + fprintf(stderr, "Send websocket response:\n %s\n", mpd.buf); #endif mg_send_websocket_frame(nc, WEBSOCKET_OP_TEXT, mpd.buf, n); } else { #ifdef DEBUG - //fprintf(stdout, "Send http response:\n %s\n", mpd.buf); + fprintf(stderr, "Send http response (first 800 chars):\n%*.*s\n", 0, 800, mpd.buf); #endif mg_send_http_chunk(nc, mpd.buf, n); }