From 505e84f7f6ad41e751488309e67d2e8e45c2ec97 Mon Sep 17 00:00:00 2001 From: Greg Dennis Date: Thu, 29 Mar 2018 23:43:21 -0400 Subject: Update debug.c to consistently output to stderr This makes debug_print_line consistent with debug_buffer and among other things, ensures output from `idevicedebug run` can be easily divided into output from the app itself (stdout) from debug output from libimobiledevice (stderr). --- common/debug.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/debug.c b/common/debug.c index acca456..a1c336b 100644 --- a/common/debug.c +++ b/common/debug.c @@ -66,13 +66,10 @@ static void debug_print_line(const char *func, const char *file, int line, const /* trim ending newlines */ /* print header */ - printf ("%s: ", header); + fprintf(stderr, "%s: ", header); /* print actual debug content */ - printf ("%s\n", buffer); - - /* flush this output, as we need to debug */ - fflush (stdout); + fprintf(stderr, "%s\n", buffer); free (header); } -- cgit v1.1-32-gdbae