From 7a86ac9cd422a2eab8fe75db2a3ed50c43cb6ecf 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 --- src/log.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/log.c b/src/log.c index b595a26..c004fb7 100644 --- a/src/log.c +++ b/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);