Commit f0b25d7b authored by Howard Chu's avatar Howard Chu
Browse files

Conditionalize use of vsyslog

parent ee705326
...@@ -164,7 +164,12 @@ void lutil_log_int( ...@@ -164,7 +164,12 @@ void lutil_log_int(
#ifdef LDAP_SYSLOG #ifdef LDAP_SYSLOG
/* we're configured to use syslog */ /* we're configured to use syslog */
if( use_syslog ) { if( use_syslog ) {
#ifdef HAVE_VSYSLOG
vsyslog( debug2syslog(level), fmt, vl ); vsyslog( debug2syslog(level), fmt, vl );
#else
vsnprintf( data, sizeof(data), fmt, vl );
syslog( debug2syslog(level), data );
#endif
return; return;
} }
#endif #endif
...@@ -317,6 +322,6 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... ) ...@@ -317,6 +322,6 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... )
fflush( log_file ); fflush( log_file );
} }
fputs( buffer, stderr ); fputs( buffer, stderr );
va_end( vl ); va_end( vl );
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment