index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2007-06-07 20:55:13 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-06-09 12:57:50 -0400 |
commit | a32ca90192ea2b2df2fadb820c9e47bbaec93151 (patch) | |
tree | 7f105ea98d8fbc52ed978c7efe4a4204e33a22f2 /lib/libalpm/util.c | |
parent | fc93601b9887ec42cd71339099eadc6fb7b775e5 (diff) |
-rw-r--r-- | lib/libalpm/util.c | 15 |
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 39935ab5..59a91705 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -379,12 +379,12 @@ int _alpm_rmrf(const char *path) return(0); } -int _alpm_logaction(unsigned short usesyslog, FILE *f, const char *str) +int _alpm_logaction(unsigned short usesyslog, FILE *f, const char *fmt, va_list args) { - _alpm_log(PM_LOG_DEBUG, _("logaction called: %s"), str); + int ret = 0; if(usesyslog) { - syslog(LOG_WARNING, "%s", str); + vsyslog(LOG_WARNING, fmt, args); } if(f) { @@ -395,14 +395,15 @@ int _alpm_logaction(unsigned short usesyslog, FILE *f, const char *str) tm = localtime(&t); /* Use ISO-8601 date format */ - fprintf(f, "[%04d-%02d-%02d %02d:%02d] %s\n", + fprintf(f, "[%04d-%02d-%02d %02d:%02d] ", tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, - tm->tm_hour, tm->tm_min, str); - + tm->tm_hour, tm->tm_min); + ret = vfprintf(f, fmt, args); + fprintf(f, "\n"); fflush(f); } - return(0); + return(ret); } int _alpm_ldconfig(const char *root) |