]> git.sur5r.net Git - openldap/commitdiff
add logfile directive to config (behind NEW_LOGGING)
authorGary Williams <gwilliams@openldap.org>
Wed, 25 Oct 2000 16:49:23 +0000 (16:49 +0000)
committerGary Williams <gwilliams@openldap.org>
Wed, 25 Oct 2000 16:49:23 +0000 (16:49 +0000)
servers/slapd/config.c

index 51fef27f4560e88e132df0f2a9088044585da9b0..7bf4e4f69bef41e437a0eea1c2be9ce1438f35b8 100644 (file)
@@ -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 );