X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/45ccc5c08c0765171721211e8e97c1ccf3db6978..e42c9458c2f1e3a78d6d45e99741d6edb38fc0cc:/log.c diff --git a/log.c b/log.c index ebf796b6..8be3605a 100644 --- a/log.c +++ b/log.c @@ -23,6 +23,7 @@ */ #include "rsync.h" + /* this is the rsync debugging function. Call it with FINFO or FERROR */ void rprintf(int fd, const char *format, ...) { @@ -33,12 +34,7 @@ void rprintf(int fd, const char *format, ...) extern int am_daemon; va_start(ap, format); - -#if HAVE_VSNPRINTF - len = vsnprintf(buf, sizeof(buf)-1, format, ap); -#else - len = vsprintf(buf, format, ap); -#endif + len = vslprintf(buf, sizeof(buf)-1, format, ap); va_end(ap); if (len < 0) exit_cleanup(1); @@ -55,7 +51,7 @@ void rprintf(int fd, const char *format, ...) if (!initialised) { initialised = 1; #ifdef LOG_DAEMON - openlog("rsyncd", LOG_PID, LOG_DAEMON); + openlog("rsyncd", LOG_PID, lp_syslog_facility()); #else openlog("rsyncd", LOG_PID); #endif