index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2006-10-20 06:26:55 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-10-20 06:26:55 +0000 |
commit | 7131b7ac87b9793c06d7b7e59df103658dd76ec7 (patch) | |
tree | d20bcf43f1d93118577c50977ce34cc6340460e1 /src | |
parent | e7f886aac3991b6a12ede9781af741b402dffb64 (diff) |
-rw-r--r-- | src/pacman/log.c | 11 | ||||
-rw-r--r-- | src/pacman/pacman.c | 2 |
diff --git a/src/pacman/log.c b/src/pacman/log.c index 25524fe3..52f30902 100644 --- a/src/pacman/log.c +++ b/src/pacman/log.c @@ -74,7 +74,16 @@ void cb_log(unsigned short level, char *msg) break; } - MSG(NL, "%s: %s\n", str, msg); + time_t t; + struct tm *tmp; + char timestr[10] = {0}; + + t = time(NULL); + tmp = localtime(&t); + strftime(timestr, 9, "%H:%M:%S", tmp); + timestr[8] = '\0'; + + MSG(NL, "[%s] %s: %s\n", timestr, str, msg); } /* Wrapper to fprintf() that allows to choose if we want the output diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 16e1b432..3b1fb8fa 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -588,7 +588,7 @@ int main(int argc, char *argv[]) } /* Opening local database */ - db_local = alpm_db_register("local", NULL); + db_local = alpm_db_register("local"); if(db_local == NULL) { ERR(NL, _("could not register 'local' database (%s)\n"), alpm_strerror(pm_errno)); cleanup(1); |