[pacman-dev] [PATCH] Print debug timestamps to same stream as rest of output

Dan McGee dan at archlinux.org
Sat Aug 20 13:08:19 EDT 2011


We used fprintf() elsewhere in this function, but we didn't use it on
the debug timestamp printing. Use fprintf() instead of printf() to fix
this.

Signed-off-by: Dan McGee <dan at archlinux.org>
---
 src/pacman/util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index 91625a1..9c1e646 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1416,7 +1416,7 @@ int pm_vfprintf(FILE *stream, alpm_loglevel_t level, const char *format, va_list
 		strftime(timestr, 9, "%H:%M:%S", tmp);
 		timestr[8] = '\0';
 
-		printf("[%s] ", timestr);
+		fprintf(stream, "[%s] ", timestr);
 	}
 #endif
 
-- 
1.7.6



More information about the pacman-dev mailing list