summaryrefslogtreecommitdiffstats
path: root/pcilib/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib/error.c')
-rw-r--r--pcilib/error.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pcilib/error.c b/pcilib/error.c
index 538534b..ad38622 100644
--- a/pcilib/error.c
+++ b/pcilib/error.c
@@ -19,13 +19,19 @@ static pcilib_logger_t pcilib_logger = pcilib_print_error;
void pcilib_log_message(const char *file, int line, pcilib_log_priority_t prio, const char *msg, ...) {
va_list va;
- if (prio >= pcilib_logger_min_prio) {
+ if ((!prio)||(prio >= pcilib_logger_min_prio)) {
va_start(va, msg);
pcilib_logger(pcilib_logger_argument, file, line, prio, msg, va);
va_end(va);
}
}
+void pcilib_log_vmessage(const char *file, int line, pcilib_log_priority_t prio, const char *msg, va_list va) {
+ if ((!prio)||(prio >= pcilib_logger_min_prio)) {
+ pcilib_logger(pcilib_logger_argument, file, line, prio, msg, va);
+ }
+}
+
int pcilib_set_logger(pcilib_log_priority_t min_prio, pcilib_logger_t logger, void *arg) {
pcilib_logger_min_prio = min_prio;