From: Gary Williams Date: Wed, 25 Oct 2000 16:49:23 +0000 (+0000) Subject: add logfile directive to config (behind NEW_LOGGING) X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1679 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d65bf0489435c3617966e3e1f084ffd736131185;p=openldap add logfile directive to config (behind NEW_LOGGING) --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 51fef27f45..7bf4e4f69b 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -814,6 +814,19 @@ read_config( const char *fname ) if ( level <= 0 ) level = lutil_mnem2level( cargv[2] ); lutil_set_debug_level( cargv[1], level ); /* specify an Object Identifier macro */ +#ifdef NEW_LOGGING + } else if ( strcasecmp( cargv[0], "logfile" ) == 0 ) { + FILE *logfile; + if ( cargc < 2 ) { + Debug( LDAP_DEBUG_ANY, + "%s: line %d: Error in logfile directive, \"logfile filename\"\n", + fname, lineno, 0 ); + return( 1 ); + } + logfile = fopen( cargv[1], "w" ); + if ( logfile != NULL ) lutil_debug_file( logfile ); + +#endif } else if ( strcasecmp( cargv[0], "objectidentifier" ) == 0 ) { parse_oidm( fname, lineno, cargc, cargv );