From a32ca90192ea2b2df2fadb820c9e47bbaec93151 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 7 Jun 2007 20:55:13 -0400 Subject: Remove logmask stuff from backend; switch logging callback to new pm_printf Remove the logmask functionality from the backend as it has been moved to the frontend, and change the logging callback function to use pm_printf. In addition, make much better use of va_list- use the args list instead of a arbitrarily chosen string to print to in the logging functions. Signed-off-by: Dan McGee --- src/util/testpkg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/util/testpkg.c') diff --git a/src/util/testpkg.c b/src/util/testpkg.c index 66569f1e..1ad1d14b 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -23,20 +23,21 @@ #include #include +#include #include #include #include -void output_cb(pmloglevel_t level, char *msg) +void output_cb(pmloglevel_t level, char *fmt, va_list args) { - if(strlen(msg)) { + if(strlen(fmt)) { switch(level) { case PM_LOG_ERROR: printf("error: "); break; case PM_LOG_WARNING: printf("warning: "); break; default: break; } - puts(msg); + vprintf(fmt, args); } } -- cgit v1.2.3