Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=50601758953450cdc4a349b1b19f0629e6fc29e1

commit 50601758953450cdc4a349b1b19f0629e6fc29e1
Author: Miklos Vajna <[EMAIL PROTECTED]>
Date:   Mon Jun 16 12:56:47 2008 +0200

libpacman: log warnings in the logfile

this allows us to track failed downloads when there are lot of targets,
for example. say there are 100 targets and the first one fails, then the
user may or may not page up to see what the problem was but we can check
the log file anytime later.

diff --git a/lib/libpacman/log.c b/lib/libpacman/log.c
index a3867d3..865fc75 100644
--- a/lib/libpacman/log.c
+++ b/lib/libpacman/log.c
@@ -46,6 +46,7 @@ void _pacman_log(unsigned char flag, char *fmt, ...)
va_end(args);

pm_logcb(flag, str);
+               pacman_logaction(str);
}
}

diff --git a/lib/libpacman/util.c b/lib/libpacman/util.c
index 0dd9b05..90637fa 100644
--- a/lib/libpacman/util.c
+++ b/lib/libpacman/util.c
@@ -363,7 +363,7 @@ int _pacman_logaction(unsigned char usesyslog, FILE *f, 
char *fmt, ...)
fprintf(f, "[%02d/%02d/%02d %02d:%02d] %s\n",
tm->tm_mon+1, tm->tm_mday, tm->tm_year-100,
tm->tm_hour, tm->tm_min,
-                       msg);
+                       _pacman_strtrim(msg));
fflush(f);
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to