mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
enable debug output for NT
This commit is contained in:
parent
92d4ccf906
commit
1b79f745fe
1 changed files with 19 additions and 0 deletions
19
servers/slapd/nt_debug.c
Normal file
19
servers/slapd/nt_debug.c
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
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 );
|
||||
}
|
||||
Loading…
Reference in a new issue