diff options
author | Greg Dennis | 2018-03-29 23:43:21 -0400 |
---|---|---|
committer | Nikias Bassen | 2020-02-20 02:40:55 +0100 |
commit | 505e84f7f6ad41e751488309e67d2e8e45c2ec97 (patch) | |
tree | 5430f712a13f2771fe504c58a9080ed06c2c0f9d /common | |
parent | ce0868cd7c6c037b70bf5329fd5e8d0d5100576f (diff) | |
download | libimobiledevice-505e84f7f6ad41e751488309e67d2e8e45c2ec97.tar.gz libimobiledevice-505e84f7f6ad41e751488309e67d2e8e45c2ec97.tar.bz2 |
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).
Diffstat (limited to 'common')
-rw-r--r-- | common/debug.c | 7 |
1 files changed, 2 insertions, 5 deletions
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); } |