From: Gary Williams Date: Thu, 1 Apr 1999 16:39:36 +0000 (+0000) Subject: enable debug output for NT X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~287 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1b79f745fe2ef23c42edd29217dc441025a55bd8;p=openldap enable debug output for NT --- diff --git a/servers/slapd/nt_debug.c b/servers/slapd/nt_debug.c new file mode 100644 index 0000000000..e506531b82 --- /dev/null +++ b/servers/slapd/nt_debug.c @@ -0,0 +1,19 @@ +#include +#include + +static FILE *log_file; + +void Debug( int level, char *fmt, ... ) +{ + char buffer[4096]; + va_list vl; + + if( log_file == NULL ) + log_file = fopen( "C:\\OpenLDAP\\run\\slapd.log", "w" ); + + va_start( vl, fmt ); + vsprintf( buffer, fmt, vl ); + fprintf( log_file, "%s\n", buffer ); + fflush( log_file ); + va_end( vl ); +}