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 ); +}