]> git.sur5r.net Git - openldap/commitdiff
Conditionalize use of vsyslog
authorHoward Chu <hyc@openldap.org>
Fri, 26 Jul 2002 02:56:01 +0000 (02:56 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 26 Jul 2002 02:56:01 +0000 (02:56 +0000)
libraries/liblber/debug.c

index 92b52d67b75c3c950079ff850cc476f2a0f80641..044b9795a3eaab5adf25e09eb64c95f0fc97dd84 100644 (file)
@@ -164,7 +164,12 @@ void lutil_log_int(
 #ifdef LDAP_SYSLOG
        /* we're configured to use syslog */
        if( use_syslog ) {
+#ifdef HAVE_VSYSLOG
                vsyslog( debug2syslog(level), fmt, vl );
+#else
+               vsnprintf( data, sizeof(data), fmt, vl );
+               syslog( debug2syslog(level), data );
+#endif
                return;
        }
 #endif
@@ -317,6 +322,6 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... )
                fflush( log_file );
        }
 
-    fputs( buffer, stderr );
+       fputs( buffer, stderr );
        va_end( vl );
 }