]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib: write debug to stdout (buffered)
authorMarek Vavruša <marek.vavrusa@nic.cz>
Tue, 5 May 2015 21:30:19 +0000 (23:30 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Tue, 5 May 2015 21:30:19 +0000 (23:30 +0200)
lib/layer.h

index 0f7f314abf072181ee0888a16a8105fcf3aa98de..2df30b7e42be90165f627ab06a4ec9e8d42b4b03 100644 (file)
@@ -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, ...)