From fc35cc9f412ee2e4a9988e43220a0499ea6190eb Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Sat, 21 Oct 2006 23:22:35 +0000 Subject: [PATCH] Log debug messages to syslog --- pam_usb/src/log.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pam_usb/src/log.c b/pam_usb/src/log.c index b595a26..c004fb7 100644 --- a/pam_usb/src/log.c +++ b/pam_usb/src/log.c @@ -58,6 +58,10 @@ void __log_debug(const char *file, int line, const char *fmt, ...) va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); + + va_start(ap, fmt); + pusb_log_syslog(LOG_DEBUG, fmt, ap); + va_end(ap); } void log_error(const char *fmt, ...) @@ -67,6 +71,7 @@ void log_error(const char *fmt, ...) va_start(ap, fmt); pusb_log_syslog(LOG_ERR, fmt, ap); va_end(ap); + va_start(ap, fmt); pusb_log_output(LOG_ERR, fmt, ap); va_end(ap); @@ -79,6 +84,7 @@ void log_info(const char *fmt, ...) va_start(ap, fmt); pusb_log_syslog(LOG_NOTICE, fmt, ap); va_end(ap); + va_start(ap, fmt); pusb_log_output(LOG_NOTICE, fmt, ap); va_end(ap);