summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/log.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-11-20 10:10:23 +0100
committerAaron Griffin <aaron@archlinux.org>2006-11-20 10:10:23 +0100
commitaa1c0ba9f8787fc3b1a1190103e394b0c1c95922 (patch)
treeed0c9675f7fc5da043a69b36e0b8c6c8e05cb583 /lib/libalpm/log.c
parentb8b9596b13de957566211b0e1db3e473ed66e147 (diff)
downloadpacman-aa1c0ba9f8787fc3b1a1190103e394b0c1c95922.tar.gz
pacman-aa1c0ba9f8787fc3b1a1190103e394b0c1c95922.tar.xz
* repo-add script - to add entries to a db file directly from package data (no PKGBUILD)
* libalpm api changes - move from a _getinfo(p, WHAT_WE_WANT) scheme to a typesafe _get_what_we_want(p) scheme [not 100% complete yet] * some const correctness changes * removal of PM_* types in alpm.h in favor of the pm*_t types used throughout libalpm
Diffstat (limited to 'lib/libalpm/log.c')
-rw-r--r--lib/libalpm/log.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
index f0dd2b18..2b543ae6 100644
--- a/lib/libalpm/log.c
+++ b/lib/libalpm/log.c
@@ -27,17 +27,14 @@
#include "alpm.h"
#include "log.h"
-/* Internal library log mechanism */
-alpm_cb_log pm_logcb = NULL;
-unsigned char pm_logmask = 0;
-
void _alpm_log(unsigned char flag, char *fmt, ...)
{
- if(pm_logcb == NULL) {
+ alpm_cb_log logcb = alpm_option_get_logcb();
+ if(logcb == NULL) {
return;
}
- if(flag & pm_logmask) {
+ if(flag & alpm_option_get_logmask()) {
char str[LOG_STR_LEN];
va_list args;
@@ -45,7 +42,7 @@ void _alpm_log(unsigned char flag, char *fmt, ...)
vsnprintf(str, LOG_STR_LEN, fmt, args);
va_end(args);
- pm_logcb(flag, str);
+ logcb(flag, str);
}
}