mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Alternate ITS#6324 fix. Use bitmask, handle -1 (LDAP_DEBUG_ANY) specially.
This commit is contained in:
parent
dd1aee481d
commit
d9d584e922
@ -3052,7 +3052,7 @@ static int
|
||||
loglevel_init( void )
|
||||
{
|
||||
slap_verbmasks lo[] = {
|
||||
{ BER_BVC("Any"), LDAP_DEBUG_ANY },
|
||||
{ BER_BVC("Any"), (slap_mask_t) LDAP_DEBUG_ANY },
|
||||
{ BER_BVC("Trace"), LDAP_DEBUG_TRACE },
|
||||
{ BER_BVC("Packets"), LDAP_DEBUG_PACKETS },
|
||||
{ BER_BVC("Args"), LDAP_DEBUG_ARGS },
|
||||
@ -3204,10 +3204,11 @@ loglevel_print( FILE *out )
|
||||
|
||||
fprintf( out, "Installed log subsystems:\n\n" );
|
||||
for ( i = 0; !BER_BVISNULL( &loglevel_ops[ i ].word ); i++ ) {
|
||||
fprintf( out, "\t%-30s (%u, 0x%x)\n",
|
||||
loglevel_ops[ i ].word.bv_val,
|
||||
(unsigned) loglevel_ops[ i ].mask,
|
||||
(unsigned) loglevel_ops[ i ].mask );
|
||||
unsigned mask = loglevel_ops[ i ].mask & 0xffffffffUL;
|
||||
fprintf( out,
|
||||
(mask == ((slap_mask_t) -1 & 0xffffffffUL)
|
||||
? "\t%-30s (-1, 0xffffffff)\n" : "\t%-30s (%u, 0x%x)\n"),
|
||||
loglevel_ops[ i ].word.bv_val, mask, mask );
|
||||
}
|
||||
|
||||
fprintf( out, "\nNOTE: custom log subsystems may be later installed "
|
||||
|
Loading…
Reference in New Issue
Block a user