}
case 's': /* set syslog level */
- if ( lutil_atoi( &ldap_syslog_level, optarg ) != 0 ) {
- fprintf( stderr, "unable to parse syslog level \"%s\"", optarg );
+ if ( !isdigit( optarg[ 0 ] ) ) {
+ slap_verbmasks str2syslog_level[] = {
+ { BER_BVC( "EMERG" ), LOG_EMERG },
+ { BER_BVC( "ALERT" ), LOG_ALERT },
+ { BER_BVC( "CRIT" ), LOG_CRIT },
+ { BER_BVC( "ERR" ), LOG_ERR },
+ { BER_BVC( "WARNING" ), LOG_WARNING },
+ { BER_BVC( "NOTICE" ), LOG_NOTICE },
+ { BER_BVC( "INFO" ), LOG_INFO },
+ { BER_BVC( "DEBUG" ), LOG_DEBUG },
+ { BER_BVNULL, 0 }
+ };
+ int i = verb_to_mask( optarg, str2syslog_level );
+ if ( BER_BVISNULL( &str2syslog_level[ i ].word ) ) {
+ Debug( LDAP_DEBUG_ANY,
+ "unknown syslog level \"%s\".\n",
+ optarg, 0, 0 );
+ goto destroy;
+ }
+
+ ldap_syslog_level = str2syslog_level[ i ].mask;
+
+ } else if ( lutil_atoi( &ldap_syslog_level, optarg ) != 0 ) {
+ Debug( LDAP_DEBUG_ANY,
+ "unable to parse syslog level \"%s\".\n",
+ optarg, 0, 0 );
goto destroy;
}
break;
CMP="diff -i"
BCMP="diff -iB"
CMPOUT=/dev/null
-SLAPD="../servers/slapd/slapd -s0"
+SLAPD="../servers/slapd/slapd -sDEBUG"
SLURPD=../servers/slurpd/slurpd
LDAPPASSWD="$CLIENTDIR/ldappasswd $TOOLARGS"
LDAPSASLSEARCH="$CLIENTDIR/ldapsearch $TOOLPROTO $LDAP_TOOLARGS -LLL"