From: Marek VavruĊĦa Date: Tue, 5 May 2015 21:30:19 +0000 (+0200) Subject: lib: write debug to stdout (buffered) X-Git-Tag: v1.0.0-beta1~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cc04c6f19cc38cd4c37d1418a087ff70debe11e;p=thirdparty%2Fknot-resolver.git lib: write debug to stdout (buffered) --- diff --git a/lib/layer.h b/lib/layer.h index 0f7f314ab..2df30b7e4 100644 --- a/lib/layer.h +++ b/lib/layer.h @@ -24,7 +24,8 @@ #define QRDEBUG(query, cls, fmt, ...) do { \ unsigned _ind = 0; \ for (struct kr_query *q = (query); q; q = q->parent, _ind += 2); \ - fprintf(stderr, "[%s] %*s" fmt, cls, _ind, "", ## __VA_ARGS__); \ + fprintf(stdout, "[%s] %*s" fmt, cls, _ind, "", ## __VA_ARGS__); \ + fflush(stdout); \ } while (0) #else #define QRDEBUG(query, cls, fmt, ...)