return mask_to_verbs( loglevel_ops, l, bva );
}
+int
+loglevel_print( FILE *out )
+{
+ int i;
+
+ if ( loglevel_ops == NULL ) {
+ loglevel_init();
+ }
+
+ fprintf( out, "Installed log subsystems:\n\n" );
+ for ( i = 0; !BER_BVISNULL( &loglevel_ops[ i ].word ); i++ ) {
+ fprintf( out, "\t%-30s (%d)\n",
+ loglevel_ops[ i ].word.bv_val,
+ loglevel_ops[ i ].mask );
+ }
+
+ fprintf( out, "\nNOTE: custom log subsystems may be later installed "
+ "by specific code\n\n" );
+
+ return 0;
+}
+
static int config_syslog;
static int
case 'd': { /* set debug level and 'do not detach' flag */
int level = 0;
+ if ( strcmp( optarg, "?" ) == 0 ) {
+ rc = loglevel_print( stdout );
+ goto destroy;
+ }
+
no_detach = 1;
if ( parse_debug_level( optarg, &level, &debug_unknowns ) ) {
goto destroy;
}
case 's': /* set syslog level */
+ if ( strcmp( optarg, "?" ) == 0 ) {
+ rc = loglevel_print( stdout );
+ goto destroy;
+ }
+
if ( parse_debug_level( optarg, &ldap_syslog, &syslog_unknowns ) ) {
goto destroy;
}
LDAP_SLAPD_F (int) loglevel2bvarray LDAP_P(( int l, BerVarray *bva ));
LDAP_SLAPD_F (const char *) loglevel2str LDAP_P(( int l ));
LDAP_SLAPD_F (int) loglevel2bv LDAP_P(( int l, struct berval *bv ));
+LDAP_SLAPD_F (int) loglevel_print LDAP_P(( FILE *out ));
LDAP_SLAPD_F (int) slap_cf_aux_table_parse LDAP_P(( const char *word, void *bc, slap_cf_aux_table *tab0, LDAP_CONST char *tabmsg ));
LDAP_SLAPD_F (int) slap_cf_aux_table_unparse LDAP_P(( void *bc, struct berval *bv, slap_cf_aux_table *tab0 ));