diff options
| author | 2018-03-29 23:43:21 -0400 | |
|---|---|---|
| committer | 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 | |||
| 66 | /* trim ending newlines */ | 66 | /* trim ending newlines */ |
| 67 | 67 | ||
| 68 | /* print header */ | 68 | /* print header */ |
| 69 | printf ("%s: ", header); | 69 | fprintf(stderr, "%s: ", header); |
| 70 | 70 | ||
| 71 | /* print actual debug content */ | 71 | /* print actual debug content */ |
| 72 | printf ("%s\n", buffer); | 72 | fprintf(stderr, "%s\n", buffer); |
| 73 | |||
| 74 | /* flush this output, as we need to debug */ | ||
| 75 | fflush (stdout); | ||
| 76 | 73 | ||
| 77 | free (header); | 74 | free (header); |
| 78 | } | 75 | } |
