(void) SIGNAL( SIGPIPE, SIG_IGN );
#endif
-#ifdef NEW_LOGGING
- lutil_log_initialize( argc, argv );
-#endif
-
if ( !not ) {
if( ( ldaphost != NULL || ldapport ) && ( ldapuri == NULL ) ) {
if ( verbose ) {
* reflect the number of subsystems and LDAP_SUBSYS_MAX reflect
* the largest subsystem number.
*/
-#define LDAP_SUBSYS_NUM 12
-#define LDAP_SUBSYS_MAX 11
+#define LDAP_SUBSYS_NUM 20
+#define LDAP_SUBSYS_MAX 19
#define LDAP_SUBSYS_GLOBAL 0
#define LDAP_SUBSYS_OPERATION 1
#define LDAP_SUBSYS_TRANSPORT 2
#define LDAP_SUBSYS_CONNECTION 3
#define LDAP_SUBSYS_FILTER 4
-#define LDAP_SUBSYS_BACKEND 5
-#define LDAP_SUBSYS_BER 6
-#define LDAP_SUBSYS_CONFIG 7
-#define LDAP_SUBSYS_ACL 8
-#define LDAP_SUBSYS_CACHE 9
-#define LDAP_SUBSYS_INDEX 10
-#define LDAP_SUBSYS_LDIF 11
+#define LDAP_SUBSYS_BER 5
+#define LDAP_SUBSYS_CONFIG 6
+#define LDAP_SUBSYS_ACL 7
+#define LDAP_SUBSYS_CACHE 8
+#define LDAP_SUBSYS_INDEX 9
+#define LDAP_SUBSYS_LDIF 10
+#define LDAP_SUBSYS_TOOLS 11
+#define LDAP_SUBSYS_SLAPD 12
+#define LDAP_SUBSYS_SLURPD 13
+#define LDAP_SUBSYS_BACKEND 14
+#define LDAP_SUBSYS_BACK_BDB 15
+#define LDAP_SUBSYS_BACK_LDBM 16
+#define LDAP_SUBSYS_BACK_LDAP 17
+#define LDAP_SUBSYS_BACK_META 18
+#define LDAP_SUBSYS_BACK_MON 19
/*
* debug reporting levels.
} while ( 0 )
# endif
-#ifndef LDAP_LOG
-# define LDAP_LOG(a) lutil_log a
-#endif
-
#else /* LDAP_DEBUG */
# define Debug( level, fmt, arg1, arg2, arg3 )
-#ifndef LDAP_LOG
-# define LDAP_LOG(a)
-#endif
-
#endif /* LDAP_DEBUG */
+#ifdef NEW_LOGGING
+extern int ldap_loglevels[LDAP_SUBSYS_NUM];
+#define LDAP_LOG(a, b, fmt, arg1, arg2, arg3) do {\
+ if (ldap_loglevels[LDAP_SUBSYS_##a] >= LDAP_LEVEL_##b || \
+ ldap_loglevels[LDAP_SUBSYS_GLOBAL] >= LDAP_LEVEL_##b)\
+ lutil_log (LDAP_SUBSYS_##a, LDAP_LEVEL_##b, fmt, arg1, arg2, arg3); \
+ } while (0)
+
+
+#define LDAP_LOGS_TEST(a, b) \
+ (ldap_loglevels[LDAP_SUBSYS_##a] >= LDAP_LEVEL_##b || \
+ ldap_loglevels[LDAP_SUBSYS_GLOBAL] >= LDAP_LEVEL_##b)
+
+#endif /* LDAP_LOG */
+
+#ifndef LDAP_LOG
+#define LDAP_LOG(a, b, fmt, arg1, arg2, arg3)
+#endif
LDAP_LUTIL_F(int) lutil_mnem2level LDAP_P(( const char *level ));
LDAP_LUTIL_F(void) lutil_log_initialize LDAP_P((
int argc, char **argv ));
-LDAP_LUTIL_F(void) lutil_set_debug_level LDAP_P((
+LDAP_LUTIL_F(int) lutil_set_debug_level LDAP_P((
const char *subsys, int level ));
LDAP_LUTIL_F(void) lutil_log LDAP_P((
- const char *subsys, int level, const char *fmt, ... ));
+ const int subsys, int level, const char *fmt, ... ));
LDAP_LUTIL_F(int) lutil_debug_file LDAP_P(( FILE *file ));
LIB_DEFS = -DLBER_LIBRARY
-SRCS= assert.c decode.c encode.c io.c bprint.c \
+SRCS= assert.c decode.c encode.c io.c bprint.c debug.c \
memory.c options.c sockbuf.c $(@PLAT@_SRCS)
-OBJS= assert.lo decode.lo encode.lo io.lo bprint.lo \
+OBJS= assert.lo decode.lo encode.lo io.lo bprint.lo debug.lo\
memory.lo options.lo sockbuf.lo $(@PLAT@_OBJS)
XSRCS= version.c
PROGRAMS= dtest etest idtest
-LDAP_INCDIR= ../../include
-LDAP_LIBDIR= ../../libraries
+LDAP_INCDIR= ../../include
+LDAP_LIBDIR= ../../libraries
XLIBS = $(LIBRARY)
XXLIBS =
fmt_reset = fmt;
#ifdef NEW_LOGGING
- LDAP_LOG(( "liblber", LDAP_LEVEL_ENTRY, "ber_scanf fmt (%s) ber:\n", fmt ));
- BER_DUMP(( "liblber", LDAP_LEVEL_DETAIL2, ber, 1 ));
+ LDAP_LOG( BER, ENTRY, "ber_scanf fmt (%s) ber:\n", fmt, 0, 0 );
+
+ if ( LDAP_LOGS_TEST(BER, DETAIL2 ))
+ BER_DUMP(( "liblber", LDAP_LEVEL_DETAIL2, ber, 1 ));
#else
ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
"ber_scanf fmt (%s) ber:\n", fmt );
default:
if( ber->ber_debug ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "liblber", LDAP_LEVEL_ERR,
- "ber_scanf: unknown fmt %c\n", *fmt ));
+ LDAP_LOG( BER, ERR,
+ "ber_scanf: unknown fmt %c\n", *fmt, 0, 0 );
#else
ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug,
"ber_scanf: unknown fmt %c\n", *fmt );
default:
if( ber->ber_debug ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "liblber", LDAP_LEVEL_ERR,
- "ber_printf: unknown fmt %c\n", *fmt ));
+ LDAP_LOG( BER, ERR,
+ "ber_printf: unknown fmt %c\n", *fmt, 0, 0 );
#else
ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug,
"ber_printf: unknown fmt %c\n", *fmt );
#endif
#include "lber-int.h"
+#include "ldap_log.h"
ber_slen_t
ber_read(
if ( sb->sb_debug ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "liblber", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BER, DETAIL1,
"ber_flush: %ld bytes to sd %ld%s\n",
towrite, (long)sb->sb_fd,
- ber->ber_rwptr != ber->ber_buf ? " (re-flush)" : "" ));
- BER_DUMP(( "liblber", LDAP_LEVEL_DETAIL2, ber, 1 ));
+ ber->ber_rwptr != ber->ber_buf ? " (re-flush)" : "" );
+
+ if(LDAP_LOGS_TEST(BER, DETAIL2))
+ BER_DUMP(( "liblber", LDAP_LEVEL_DETAIL2, ber, 1 ));
+
#else
ber_log_printf( LDAP_DEBUG_ANY, sb->sb_debug,
"ber_flush: %ld bytes to sd %ld%s\n",
assert( LBER_VALID( ber ) );
#ifdef NEW_LOGGING
- LDAP_LOG(( "liblber", LDAP_LEVEL_ENTRY, "ber_get_next: enter\n" ));
+ LDAP_LOG( BER, ENTRY, "ber_get_next: enter\n", 0, 0, 0 );
#else
ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
"ber_get_next\n" );
return LBER_DEFAULT;
} else if ( sb->sb_max_incoming && ber->ber_len > sb->sb_max_incoming ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "liblber", LDAP_LEVEL_ERR,
+ LDAP_LOG( BER, ERR,
"ber_get_next: sockbuf_max_incoming limit hit "
- "(%d > %d)\n", ber->ber_len, sb->sb_max_incoming ));
+ "(%d > %d)\n", ber->ber_len, sb->sb_max_incoming, 0 );
#else
ber_log_printf( LDAP_DEBUG_CONNS, ber->ber_debug,
"ber_get_next: sockbuf_max_incoming limit hit "
*len = ber->ber_len;
if ( ber->ber_debug ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "liblber", LDAP_LEVEL_DETAIL1,
- "ber_get_next: tag 0x%lx len %ld\n",
- ber->ber_tag, ber->ber_len ));
- BER_DUMP(( "liblber", LDAP_LEVEL_DETAIL2, ber, 1 ));
+ LDAP_LOG( BER, DETAIL1,
+ "ber_get_next: tag 0x%lx len %ld\n",
+ ber->ber_tag, ber->ber_len, 0 );
+ if(LDAP_LOGS_TEST(BER, DETAIL2))
+ BER_DUMP(( "liblber", LDAP_LEVEL_DETAIL2, ber, 1 ));
#else
ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
"ber_get_next: tag 0x%lx len %ld contents:\n",
};
#ifdef NEW_LOGGING
+/*
# ifdef LDAP_DEBUG
# ifdef LDAP_LOG
# undef LDAP_LOG
# endif
# define LDAP_LOG(a) ber_pvt_log_output a
+ */
# define BER_DUMP(a) ber_output_dump a
+/*
# else
# define LDAP_LOG(a)
# define BER_DUMP(a)
# endif
+ */
#endif
LBER_F( int ) ber_pvt_log_output(
{
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "abandon", LDAP_LEVEL_ARGS, "ldap_abandon_ext %d\n", msgid ));
+ LDAP_LOG ( OPERATION, ARGS, "ldap_abandon_ext %d\n", msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_abandon_ext %d\n", msgid, 0, 0 );
#endif
ldap_abandon( LDAP *ld, int msgid )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "abandon", LDAP_LEVEL_ARGS, "ldap_abandon %d\n", msgid ));
+ LDAP_LOG ( OPERATION, ARGS, "ldap_abandon %d\n", msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_abandon %d\n", msgid, 0, 0 );
#endif
LDAPRequest *lr;
#ifdef NEW_LOGGING
- LDAP_LOG (( "abandon", LDAP_LEVEL_ARGS, "do_abandon %d, msgid %d\n",
- origid, msgid ));
+ LDAP_LOG ( OPERATION, ARGS, "do_abandon %d, msgid %d\n", origid, msgid, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_abandon origid %d, msgid %d\n",
origid, msgid, 0 );
int i, rc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_ENTRY, "ldap_add_ext\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_add_ext\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_add_ext\n", 0, 0, 0 );
#endif
#include <ac/time.h>
#include "ldap-int.h"
-
+#include "ldap_log.h"
/*
* ldap_bind - bind to the ldap server (and X.500). The dn and password
ldap_bind( LDAP *ld, LDAP_CONST char *dn, LDAP_CONST char *passwd, int authmethod )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "bind", LDAP_LEVEL_ENTRY, "ldap_bind\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_bind\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_bind\n", 0, 0, 0 );
#endif
int authmethod )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "bind", LDAP_LEVEL_ENTRY, "ldap_bind_s\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_bind_s\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_bind_s\n", 0, 0, 0 );
#endif
assert( LDAP_VALID( ld ) );
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_ENTRY, "ldap_flush_cache\n" ));
+ LDAP_LOG ( CACHE, ENTRY, "ldap_flush_cache\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_flush_cache\n", 0, 0, 0 );
#endif
#ifndef LDAP_NOCACHE
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_ARGS,
- "ldap_uncache_request %d ld_cache %lx\n",
- msgid, (long) ld->ld_cache ));
+
+ LDAP_LOG ( CACHE, ARGS, "ldap_uncache_request %d ld_cache %lx\n",
+ msgid, (long) ld->ld_cache, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_uncache_request %d ld_cache %lx\n",
msgid, (long) ld->ld_cache, 0 );
#ifndef LDAP_NOCACHE
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_ARGS,
- "ldap_uncache_entry %s ld_cache %lx\n",
- dn, (long) ld->ld_cache ));
+
+ LDAP_LOG ( CACHE, ARGS, "ldap_uncache_entry %s ld_cache %lx\n",
+ dn, (long) ld->ld_cache, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_uncache_entry %s ld_cache %lx\n",
dn, (long) ld->ld_cache, 0 );
LDAPMessage *m, *prev, *next;
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_ARGS,
+
+ LDAP_LOG ( CACHE, ARGS,
"uncache_entry_or_req dn %s msgid %ld ld_cache %lx\n",
- dn, (long) msgid, (long) ld->ld_cache ));
+ dn, (long) msgid, (long) ld->ld_cache );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_uncache_entry_or_req dn %s msgid %ld ld_cache %lx\n",
assert( LDAP_VALID( ld ) );
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_ENTRY, "ldap_add_request_to_cache\n" ));
+ LDAP_LOG ( CACHE, ENTRY, "ldap_add_request_to_cache\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_add_request_to_cache\n", 0, 0, 0 );
#endif
assert( result != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_ARGS,
+
+ LDAP_LOG ( CACHE, ARGS,
"ldap_add_result_to_cache: id %ld, type %ld\n",
- (long) result->lm_msgid, (long) result->lm_msgtype ));
+ (long) result->lm_msgid, (long) result->lm_msgtype, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_add_result_to_cache: id %ld, type %ld\n",
(long) result->lm_msgid, (long) result->lm_msgtype, 0 );
if ( ld->ld_cache == NULL ||
( ld->ld_cache->lc_enabled == 0 )) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_DETAIL1,
- "ldap_add_result_to_cache: cache disabled\n" ));
+ LDAP_LOG ( CACHE, DETAIL1,
+ "ldap_add_result_to_cache: cache disabled\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "artc: cache disabled\n", 0, 0, 0 );
#endif
* only cache search and compare operations
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_DETAIL1,
- "ldap_add_result_to_cache: "
- "only caching search & compare operations\n" ));
+ LDAP_LOG ( CACHE, DETAIL1,
+ "ldap_add_result_to_cache: only caching search & "
+ "compare operations\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"artc: only caching search & compare operations\n", 0, 0, 0 );
new->lm_chain = NULL;
m->lm_chain = new;
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_RESULTS,
+ LDAP_LOG ( CACHE, RESULTS,
"ldap_add_result_to_cache: "
- "result added to cache request chain\n" ));
+ "result added to cache request chain\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"artc: result added to cache request chain\n",
if ( !keep ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_RESULTS,
+ LDAP_LOG ( CACHE, RESULTS,
"ldap_add_result_to_cache: "
- "not caching result with error\n" ));
+ "not caching result with error\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"artc: not caching result with error %d\n",
ld->ld_cache->lc_memused += msg_size( req );
check_cache_memused( ld->ld_cache );
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_RESULTS,
+ LDAP_LOG ( CACHE, RESULTS,
"ldap_add_result_to_cache: "
- "cached result with error\n" ));
+ "cached result with error\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"artc: cached result with error %d\n",
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_RESULTS,
- "ldap_add_result_to_cache: "
- "msgid not in request list\n" ));
+ LDAP_LOG ( CACHE, RESULTS,
+ "ldap_add_result_to_cache: msgid not in request list\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "artc: msgid not in request list\n",
0, 0, 0 );
assert( request != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_ENTRY, "ldap_check_cache\n" ));
+ LDAP_LOG ( CACHE, ENTRY, "ldap_check_cache\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_check_cache\n", 0, 0, 0 );
#endif
hash = cache_hash( &reqber );
for ( m = ld->ld_cache->lc_buckets[ hash ]; m != NULL; m = next ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( CACHE, DETAIL1,
"ldap_check_cache: examining id %ld, type %ld\n",
- (long) m->lm_msgid, (long) m->lm_msgtype ));
+ (long) m->lm_msgid, (long) m->lm_msgtype, 0 );
#else
Debug( LDAP_DEBUG_TRACE,"cc: examining id %ld,type %ld\n",
(long) m->lm_msgid, (long) m->lm_msgtype, 0 );
prev->lm_next = next;
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_DETAIL1,
- "ldap_check_cache: expired id %ld\n",
- (long) m->lm_msgid ));
+ LDAP_LOG ( CACHE, DETAIL1, "ldap_check_cache: expired id %ld\n",
+ (long) m->lm_msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "cc: expired id %d\n",
m->lm_msgid, 0, 0 );
}
prev = new;
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_DETAIL1,
- "ldap_check_cache: added type %ld\n",
- (long) m->lm_msgtype ));
+ LDAP_LOG ( CACHE, DETAIL1, "ldap_check_cache: added type %ld\n",
+ (long) m->lm_msgtype, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "cc: added type %ld\n",
(long) new->lm_msgtype, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_RESULTS,
- "ldap_check_cache: result returned from cache\n" ));
+ LDAP_LOG ( CACHE, RESULTS,
+ "ldap_check_cache: result returned from cache\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "cc: result returned from cache\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_RESULTS,
- "cache_hash: len is %ld, returning %ld\n",
- len, len % LDAP_CACHE_BUCKETS ));
+ LDAP_LOG ( CACHE, RESULTS, "cache_hash: len is %ld, returning %ld\n",
+ len, len % LDAP_CACHE_BUCKETS, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "cache_hash: len is %ld, returning %ld\n",
len, len % LDAP_CACHE_BUCKETS, 0 );
LDAPMessage *m, *prev, *next;
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( CACHE, DETAIL1,
"check_cache_memused: %ld bytes in use (%ld max)\n",
- lc->lc_memused, lc->lc_maxmem ));
+ lc->lc_memused, lc->lc_maxmem, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "check_cache_memused: %ld bytes in use (%ld max)\n",
lc->lc_memused, lc->lc_maxmem, 0 );
}
lc->lc_memused -= msg_size( m );
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_DETAIL1,
- "check_cache_memused: removed %ld\n",
- m->lm_msgid ));
+ LDAP_LOG ( CACHE, DETAIL1,
+ "check_cache_memused: removed %ld\n", m->lm_msgid,0,0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ccm: removed %d\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "cache", LDAP_LEVEL_DETAIL1,
- "check_cache_memused: reduced usage to %ld bytes\n",
- lc->lc_memused ));
+ LDAP_LOG ( CACHE, DETAIL1,
+ "check_cache_memused: reduced usage to %ld bytes\n",
+ lc->lc_memused, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ccm: reduced usage to %ld bytes\n",
lc->lc_memused, 0, 0 );
#include <ac/time.h>
#include "ldap-int.h"
+#include "ldap_log.h"
/*
* ldap_compare_ext - perform an ldap extended compare operation. The dn
BerElement *ber;
#ifdef NEW_LOGGING
- LDAP_LOG (( "compare", LDAP_LEVEL_ENTRY, "ldap_compare\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_compare\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_compare\n", 0, 0, 0 );
#endif
int ldap_pvt_sasl_install( Sockbuf *sb, void *ctx_arg )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "cyrus", LDAP_LEVEL_ENTRY, "ldap_pvt_sasl_install\n" ));
+ LDAP_LOG ( TRANSPORT, ENTRY, "ldap_pvt_sasl_install\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_pvt_sasl_install\n",
0, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "cyrus", LDAP_LEVEL_DETAIL1,
- "ldap_int_sasl_open: host=%s\n", host ));
+ LDAP_LOG ( TRANSPORT, DETAIL1, "ldap_int_sasl_open: host=%s\n",
+ host, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_int_sasl_open: host=%s\n",
host, 0, 0 );
(void *) &extprops );
#endif
#ifdef NEW_LOGGING
- LDAP_LOG (( "cyrus", LDAP_LEVEL_DETAIL1,
- "ldap_int_sasl_open: ssf=%ld\n", (long) ssf ));
+ LDAP_LOG ( TRANSPORT, DETAIL1,
+ "ldap_int_sasl_open: ssf=%ld\n", (long) ssf, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_int_sasl_open: ssf=%ld\n",
(long) ssf, 0, 0 );
ber_socket_t sd;
#ifdef NEW_LOGGING
- LDAP_LOG (( "cyrus", LDAP_LEVEL_ARGS,
- "ldap_int_sasl_bind: %s\n", mechs ? mechs : "<null>" ));
+ LDAP_LOG ( TRANSPORT, ARGS, "ldap_int_sasl_bind: %s\n",
+ mechs ? mechs : "<null>", 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_int_sasl_bind: %s\n",
mechs ? mechs : "<null>", 0, 0 );
if( scred && scred->bv_len ) {
/* and server provided us with data? */
#ifdef NEW_LOGGING
- LDAP_LOG (( "cyrus", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( TRANSPORT, DETAIL1,
"ldap_int_sasl_bind: rc=%d sasl=%d len=%ld\n",
- rc, saslrc, scred->bv_len ));
+ rc, saslrc, scred->bv_len );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_int_sasl_bind: rc=%d sasl=%d len=%ld\n",
if( scred && scred->bv_len ) {
/* but server provided us with data! */
#ifdef NEW_LOGGING
- LDAP_LOG (( "cyrus", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( TRANSPORT, DETAIL1,
"ldap_int_sasl_bind: rc=%d sasl=%d len=%ld\n",
- rc, saslrc, scred->bv_len ));
+ rc, saslrc, scred->bv_len );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_int_sasl_bind: rc=%d sasl=%d len=%ld\n",
&credlen );
#ifdef NEW_LOGGING
- LDAP_LOG (( "cyrus", LDAP_LEVEL_DETAIL1,
- "ldap_int_sasl_bind: sasl_client_step: %d\n", saslrc ));
+ LDAP_LOG ( TRANSPORT, DETAIL1,
+ "ldap_int_sasl_bind: sasl_client_step: %d\n", saslrc,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "sasl_client_step: %d\n",
saslrc, 0, 0 );
BerElement *ber;
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_ENTRY, "ldap_delete_ext\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_delete_ext\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_delete_ext\n", 0, 0, 0 );
#endif
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_ENTRY, "ldap_delete\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_delete\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_delete\n", 0, 0, 0 );
#endif
const struct ldaperror *e;
#ifdef NEW_LOGGING
- LDAP_LOG (( "error", LDAP_LEVEL_ENTRY, "ldap_err2string\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_err2string\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_err2string\n", 0, 0, 0 );
#endif
{
const struct ldaperror *e;
#ifdef NEW_LOGGING
- LDAP_LOG (( "error", LDAP_LEVEL_ENTRY, "ldap_perror\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_perror\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_perror\n", 0, 0, 0 );
#endif
BerElement *ber;
#ifdef NEW_LOGGING
- LDAP_LOG (( "error", LDAP_LEVEL_ENTRY, "ldap_parse_result\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_parse_result\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_parse_result\n", 0, 0, 0 );
#endif
#include <ac/time.h>
#include "ldap-int.h"
+#include "ldap_log.h"
int
ldap_extended_operation(
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "extended", LDAP_LEVEL_ENTRY, "ldap_extended_operation\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_extended_operation\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_extended_operation\n", 0, 0, 0 );
#endif
LDAPMessage *res;
#ifdef NEW_LOGGING
- LDAP_LOG (( "extended", LDAP_LEVEL_ENTRY, "ldap_extended_operation_s\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_extended_operation_s\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_extended_operation_s\n", 0, 0, 0 );
#endif
assert( res != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG (( "extended", LDAP_LEVEL_ENTRY, "ldap_parse_extended_result\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_parse_extended_result\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_parse_extended_result\n", 0, 0, 0 );
#endif
assert( res != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG (( "extended", LDAP_LEVEL_ENTRY,
- "ldap_parse_extended_partial\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_parse_extended_partial\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_parse_extended_partial\n", 0, 0, 0 );
#endif
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS, "ldap_pvt_put_filter: \"%s\"\n",
- str_in ));
+ LDAP_LOG ( FILTER, ARGS, "ldap_pvt_put_filter: \"%s\"\n", str_in,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: \"%s\"\n", str_in, 0, 0 );
#endif
switch ( *str ) {
case '&':
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: AND\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: AND\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: AND\n",
0, 0, 0 );
case '|':
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: OR\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: OR\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: OR\n",
0, 0, 0 );
case '!':
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: NOT\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: NOT\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: NOT\n",
0, 0, 0 );
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: simple\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: simple\n", 0,0,0);
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: simple\n",
0, 0, 0 );
case /*'('*/ ')':
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: end\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: end\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: end\n",
0, 0, 0 );
default: /* assume it's a simple type=value filter */
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: default\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: default\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: default\n",
0, 0, 0 );
char save;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS,
- "put_filter_list \"%s\"\n", str ));
+ LDAP_LOG ( FILTER, ARGS, "put_filter_list \"%s\"\n", str,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter_list \"%s\"\n",
str, 0, 0 );
int rc = -1;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS,
- "put_simple_filter: \"%s\"\n", str ));
+ LDAP_LOG ( FILTER, ARGS, "put_simple_filter: \"%s\"\n", str,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_simple_filter: \"%s\"\n",
str, 0, 0 );
ber_tag_t ftype = LDAP_FILTER_SUBSTRINGS;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS,
- "put_substring_filter \"%s=%s\"\n", type, val ));
+ LDAP_LOG ( FILTER, ARGS, "put_substring_filter \"%s=%s\"\n", type, val, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_substring_filter \"%s=%s\"\n",
type, val, 0 );
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS, "put_vrFilter: \"%s\"\n",
- str_in ));
+ LDAP_LOG ( FILTER, ARGS, "ldap_pvt_put_vrFilter: \"%s\"\n",
+ str_in, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_vrFilter: \"%s\"\n", str_in, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "put_vrFilter: simple\n" ));
+ LDAP_LOG ( FILTER, DETAIL1,
+ "put_vrFilter: simple\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_vrFilter: simple\n",
0, 0, 0 );
case /*'('*/ ')':
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: end\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: end\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: end\n",
0, 0, 0 );
default: /* assume it's a simple type=value filter */
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: default\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: default\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: default\n",
0, 0, 0 );
char save;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS,
- "put_vrFilter_list \"%s\"\n", str ));
+ LDAP_LOG ( FILTER, ARGS, "put_vrFilter_list \"%s\"\n", str, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_vrFilter_list \"%s\"\n",
str, 0, 0 );
int rc = -1;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS,
- "put_simple_vrFilter: \"%s\"\n", str ));
+ LDAP_LOG ( FILTER, ARGS, "put_simple_vrFilter: \"%s\"\n", str, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_simple_vrFilter: \"%s\"\n",
str, 0, 0 );
BerElement *ber;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getattr", LDAP_LEVEL_ENTRY, "ldap_first_attribute\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_first_attribute\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_first_attribute\n", 0, 0, 0 );
#endif
char *attr;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getattr", LDAP_LEVEL_ENTRY, "ldap_next_attribute\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_next_attribute\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_next_attribute\n", 0, 0, 0 );
#endif
BerElement tmp;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_ENTRY, "ldap_get_dn\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_get_dn\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_get_dn\n", 0, 0, 0 );
#endif
char *out = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_ENTRY, "ldap_dn2ufn\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_dn2ufn\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_dn2ufn\n", 0, 0, 0 );
#endif
unsigned flag = notypes ? LDAP_DN_FORMAT_UFN : LDAP_DN_FORMAT_LDAPV3;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_ENTRY, "ldap_explode_dn\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_explode_dn\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_explode_dn\n", 0, 0, 0 );
#endif
int iAVA;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_ENTRY, "ldap_explode_rdn\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_explode_rdn\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_explode_rdn\n", 0, 0, 0 );
#endif
char *out = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_ENTRY, "ldap_dn2dcedn\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_dn2dcedn\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_dn2dcedn\n", 0, 0, 0 );
#endif
char *out = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_ENTRY, "ldap_dcedn2dn\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_dcedn2dn\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_dcedn2dn\n", 0, 0, 0 );
#endif
char *out = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_ENTRY, "ldap_dn2ad_canonical\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_dn2ad_canonical\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_dn2ad_canonical\n", 0, 0, 0 );
#endif
LDAPDN *tmpDN = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_ENTRY, "ldap_dn_normalize\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_dn_normalize\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_dn_normalize\n", 0, 0, 0 );
#endif
assert( dn );
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_ARGS, "ldap_bv2dn(%s,%u)\n%s",
- str, flags, "" ));
-#elif 0
+ LDAP_LOG ( OPERATION, ARGS, "ldap_bv2dn(%s,%u)\n%s", str, flags, "" );
+#else
Debug( LDAP_DEBUG_TRACE, "=> ldap_bv2dn(%s,%u)\n%s", str, flags, "" );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_RESULTS, "<= ldap_bv2dn(%s,%u)=%d\n",
- str, flags, rc ));
-#elif 0
+ LDAP_LOG ( OPERATION, RESULTS, "<= ldap_bv2dn(%s,%u)=%d\n",
+ str, flags, rc );
+#else
Debug( LDAP_DEBUG_TRACE, "<= ldap_bv2dn(%s,%u)=%d\n", str, flags, rc );
#endif
*dn = newDN;
bv->bv_val = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_ARGS, "=> ldap_dn2bv(%u)\n%s%s",
- flags, "", "" ));
-#elif 0
+ LDAP_LOG ( OPERATION, ARGS, "=> ldap_dn2bv(%u)\n%s%s",
+ flags, "", "" );
+#else
Debug( LDAP_DEBUG_TRACE, "=> ldap_dn2bv(%u)\n%s%s", flags, "", "" );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "getdn", LDAP_LEVEL_RESULTS, "<= ldap_dn2bv(%s,%u)=%d\n",
- bv->bv_val, flags, rc ));
-#elif 0
+ LDAP_LOG ( OPERATION, RESULTS, "<= ldap_dn2bv(%s,%u)=%d\n",
+ bv->bv_val, flags, rc );
+#else
Debug( LDAP_DEBUG_TRACE, "<= ldap_dn2bv(%s,%u)=%d\n",
bv->bv_val, flags, rc );
#endif
regerror(rc, &re, error, sizeof(error));
ldap_getfilter_free( lfdp );
#ifdef NEW_LOGGING
- LDAP_LOG (( "getfilter", LDAP_LEVEL_ERR,
- "ldap_init_get_filter_buf: bad regular expression %s, %s\n",
- nextflp->lfl_pattern, error ));
+ LDAP_LOG ( FILTER, ERR,
+ "ldap_init_get_filter_buf: bad regular expression %s, %s\n",
+ nextflp->lfl_pattern, error, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ldap_init_get_filter_buf: "
"bad regular expression %s, %s\n",
assert( target != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG (( "getvalues", LDAP_LEVEL_ENTRY, "ldap_get_values\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_get_values\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_get_values\n", 0, 0, 0 );
#endif
assert( target != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG (( "getvalues", LDAP_LEVEL_ENTRY, "ldap_get_values_len\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_get_values_len\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_get_values_len\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
- "openldap_init_w_conf: trying %s\n", file ));
+ LDAP_LOG ( CONFIG, DETAIL1,
+ "openldap_init_w_conf: trying %s\n", file, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "ldap_init: trying %s\n", file, 0, 0);
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
- "openldap_init_w_conf: using %s\n", file ));
+ LDAP_LOG ( CONFIG, DETAIL1, "openldap_init_w_conf: using %s\n", file, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "ldap_init: using %s\n", file, 0, 0);
#endif
if (home != NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "init", LDAP_LEVEL_ARGS,
- "openldap_init_w_userconf: HOME env is %s\n", home ));
+ LDAP_LOG ( CONFIG, ARGS,
+ "openldap_init_w_userconf: HOME env is %s\n", home, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "ldap_init: HOME env is %s\n",
home, 0, 0);
path = LDAP_MALLOC(strlen(home) + strlen(file) + 3);
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "init", LDAP_LEVEL_ARGS,
- "openldap_init_w_userconf: HOME env is NULL\n" ));
+ LDAP_LOG ( CONFIG, ARGS, "openldap_init_w_userconf: HOME env is NULL\n",
+ 0, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "ldap_init: HOME env is NULL\n",
0, 0, 0);
if( altfile != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( CONFIG, DETAIL1,
"openldap_init_w_userconf: %sCONF env is %s\n",
- LDAP_ENV_PREFIX, altfile ));
+ LDAP_ENV_PREFIX, altfile, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "ldap_init: %s env is %s\n",
LDAP_ENV_PREFIX "CONF", altfile, 0);
}
else
#ifdef NEW_LOGGING
- LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( CONFIG, DETAIL1,
"openldap_init_w_userconf: %sCONF env is NULL\n",
- LDAP_ENV_PREFIX ));
+ LDAP_ENV_PREFIX, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "ldap_init: %s env is NULL\n",
LDAP_ENV_PREFIX "CONF", 0, 0);
if( altfile != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( CONFIG, DETAIL1,
"openldap_init_w_userconf: %sRC env is %s\n",
- LDAP_ENV_PREFIX, altfile ));
+ LDAP_ENV_PREFIX, altfile, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "ldap_init: %s env is %s\n",
LDAP_ENV_PREFIX "RC", altfile, 0);
}
else
#ifdef NEW_LOGGING
- LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( CONFIG, DETAIL1,
"openldap_init_w_userconf: %sRC env is NULL\n",
- LDAP_ENV_PREFIX ));
+ LDAP_ENV_PREFIX, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "ldap_init: %s env is NULL\n",
LDAP_ENV_PREFIX "RC", 0, 0);
#include "ldap-int.h"
-
/*
* ldap_kerberos_bind1 - initiate a bind to the ldap server using
* kerberos authentication. The dn is supplied. It is assumed the user
ber_len_t credlen;
#ifdef NEW_LOGGING
- LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, "ldap_kerberos_bind1\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_kerberos_bind1\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind1\n", 0, 0, 0 );
#endif
LDAPMessage *res;
#ifdef NEW_LOGGING
- LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, "ldap_kerberos_bind1_s\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_kerberos_bind1_s\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind1_s\n", 0, 0, 0 );
#endif
ber_len_t credlen;
#ifdef NEW_LOGGING
- LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, "ldap_kerberos_bind2\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_kerberos_bind2\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind2\n", 0, 0, 0 );
#endif
LDAPMessage *res;
#ifdef NEW_LOGGING
- LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, "ldap_kerberos_bind2_s\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_kerberos_bind2_s\n" , 0, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind2_s\n", 0, 0, 0 );
#endif
int err;
#ifdef NEW_LOGGING
- LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, "ldap_kerberos_bind_s\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_kerberos_bind_s\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind_s\n", 0, 0, 0 );
#endif
char realm[REALM_SZ], *cred, *krbinstance;
#ifdef NEW_LOGGING
- LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY,
- "ldap_get_kerberosv4_credentials\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_get_kerberosv4_credentials\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_get_kerberosv4_credentials\n", 0, 0, 0 );
#endif
if ( (err = krb_get_tf_realm( tkt_string(), realm )) != KSUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "kbind", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"ldap_get_kerberosv4_credentials: krb_get_tf_realm failed: %s\n",
- krb_err_txt[err] ));
+ krb_err_txt[err], 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ldap_get_kerberosv4_credentials: "
"krb_get_tf_realm failed: %s\n", krb_err_txt[err], 0, 0 );
!= KSUCCESS )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "kbind", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"ldap_get_kerberosv4_credentials: krb_mk_req failed: %s\n",
- krb_err_txt[err] ));
+ krb_err_txt[err], 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ldap_get_kerberosv4_credentials: "
"krb_mk_req failed (%s)\n", krb_err_txt[err], 0, 0 );
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ENTRY, "ldap_modify_ext\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_modify_ext\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_modify_ext\n", 0, 0, 0 );
#endif
int rc, msgid;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ENTRY, "ldap_modify\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_modify\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_modify\n", 0, 0, 0 );
#endif
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ENTRY, "ldap_rename\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_rename\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_rename\n", 0, 0, 0 );
#endif
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ENTRY, "ldap_rename2\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_rename2\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_rename2\n", 0, 0, 0 );
#endif
#include <ac/time.h>
#include "ldap-int.h"
+#include "ldap_log.h"
int ldap_open_defconn( LDAP *ld )
{
LDAP *ld;
#ifdef NEW_LOGGING
- LDAP_LOG (( "open", LDAP_LEVEL_ARGS, "ldap_open(%s, %d)\n",
- host, port ));
+ LDAP_LOG ( CONNECTION, ARGS, "ldap_open(%s, %d)\n", host, port, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_open(%s, %d)\n",
host, port, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "open", LDAP_LEVEL_RESULTS, "ldap_open: %s\n",
- ld == NULL ? "succeeded" : "failed" ));
+ LDAP_LOG ( CONNECTION, RESULTS, "ldap_open: %s\n",
+ ld == NULL ? "succeeded" : "failed", 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_open: %s\n",
ld == NULL ? "succeeded" : "failed", 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "open", LDAP_LEVEL_ENTRY, "ldap_create\n" ));
+ LDAP_LOG ( CONNECTION, ENTRY, "ldap_create\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_create\n", 0, 0, 0 );
#endif
long addr;
#ifdef NEW_LOGGING
- LDAP_LOG (( "open", LDAP_LEVEL_ENTRY, "ldap_int_open_connection\n" ));
+ LDAP_LOG ( CONNECTION, ENTRY, "ldap_int_open_connection\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_int_open_connection\n", 0, 0, 0 );
#endif
struct selectinfo *sip;
#ifdef NEW_LOGGING
- LDAP_LOG (( "os-ip", LDAP_LEVEL_ENTRY, "ldap_int_select\n" ));
+ LDAP_LOG ( CONNECTION, ENTRY, "ldap_int_select\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_int_select\n", 0, 0, 0 );
#endif
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ENTRY, "ldap_send_initial_request\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_send_initial_request\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_send_initial_request\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_DETAIL1,
- "ldap_send_initial_request: ldap_open_defconn: successful\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "ldap_send_initial_request: ldap_open_defconn: successful\n" ,
+ 0, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_open_defconn: successful\n",
int incparent;
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ENTRY, "ldap_send_server_request\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_send_server_request\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_send_server_request\n", 0, 0, 0 );
#endif
Sockbuf *sb = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ENTRY, "ldap_new_connection\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_new_connection\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_new_connection\n", 0, 0, 0 );
#endif
ld->ld_defconn = lc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_DETAIL1,
- "ldap_new_connection: Call application rebind_proc\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "ldap_new_connection: Call application rebind_proc\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "Call application rebind_proc\n", 0, 0, 0);
#endif
ld->ld_defconn = lc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_DETAIL1,
- "ldap_new_connection: anonymous rebind via ldap_bind_s\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "ldap_new_connection: anonymous rebind via ldap_bind_s\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "anonymous rebind via ldap_bind_s\n", 0, 0, 0);
#endif
LDAPConn *tmplc, *prevlc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ENTRY, "ldap_free_connection\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_free_connection\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_free_connection\n", 0, 0, 0 );
#endif
}
LDAP_FREE( lc );
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_RESULTS,
- "ldap_free_connection: actually freed\n" ));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "ldap_free_connection: actually freed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_free_connection: actually freed\n",
0, 0, 0 );
} else {
lc->lconn_lastused = time( NULL );
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_RESULTS,
- "ldap_free_connection: refcnt %d\n", lc->lconn_refcnt ));
+ LDAP_LOG ( OPERATION, RESULTS, "ldap_free_connection: refcnt %d\n",
+ lc->lconn_refcnt, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_free_connection: refcnt %d\n",
lc->lconn_refcnt, 0, 0 );
LDAPRequest **ttmplr;
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ARGS,
- "ldap_free_request (origid %d, msgid %d)\n",
- lr->lr_origid, lr->lr_msgid ));
+ LDAP_LOG ( OPERATION, ARGS, "ldap_free_request (origid %d, msgid %d)\n",
+ lr->lr_origid, lr->lr_msgid, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_free_request (origid %d, msgid %d)\n",
lr->lr_origid, lr->lr_msgid, 0 );
*hadrefp = 0;
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ENTRY, "ldap_chase_v3referrals\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_chase_v3referrals\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_chase_v3referrals\n", 0, 0, 0 );
#endif
/* Check for hop limit exceeded */
if ( lr->lr_parentcnt >= ld->ld_refhoplimit ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"ldap_chase_v3referrals: more than %d referral hops (dropping)\n",
- ld->ld_refhoplimit ));
+ ld->ld_refhoplimit, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"more than %d referral hops (dropping)\n", ld->ld_refhoplimit, 0, 0 );
* for the same server with different contexts.
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"ldap_chase_v3referrals: queue referral \"%s\"\n",
- refarray[i] ));
+ refarray[i], 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_chase_v3referrals: queue referral \"%s\"\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"ldap_chase_v3referrals: msgid %d, url \"%s\"\n",
- lr->lr_msgid, refarray[i] ));
+ lr->lr_msgid, refarray[i], 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_chase_v3referral: msgid %d, url \"%s\"\n",
origreq, srv, NULL, &rinfo )) < 0 ) {
/* Failure, try next referral in the list */
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"ldap_chase_v3referrals: Unable to chase referral \"%s\" (%s)\n",
- refarray[i], ldap_err2string( ld->ld_errno ) ));
+ refarray[i], ldap_err2string( ld->ld_errno ), 0 );
#else
Debug( LDAP_DEBUG_ANY, "Unable to chase referral \"%s\" (%s)\n",
refarray[i], ldap_err2string( ld->ld_errno ), 0);
LDAPreqinfo rinfo;
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ENTRY, "ldap_chase_referrals\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_chase_referrals\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_chase_referrals\n", 0, 0, 0 );
#endif
if ( lr->lr_parentcnt >= ld->ld_refhoplimit ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ENTRY,
+ LDAP_LOG ( OPERATION, ENTRY,
"ldap_chase_referrals: more than %d referral hops (dropping)\n",
- ld->ld_refhoplimit ));
+ ld->ld_refhoplimit, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"more than %d referral hops (dropping)\n",
if ( rc != LDAP_URL_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"ldap_chase_referrals: ignoring unknown referral <%s>\n",
- ref ));
+ ref, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ignoring unknown referral <%s>\n", ref, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_DETAIL1,
- "ldap_chase_referrals: chasing LDAP referral <%s>\n", ref ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "ldap_chase_referrals: chasing LDAP referral <%s>\n", ref, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"chasing LDAP referral: <%s>\n", ref, 0, 0 );
++count;
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"ldap_chase_referrals: Unable to chase referral <%s>\n",
- ldap_err2string( ld->ld_errno) ));
+ ldap_err2string( ld->ld_errno), 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Unable to chase referral (%s)\n",
char *dn;
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_ARGS,
+ LDAP_LOG ( OPERATION, ARGS,
"re_encode_request: new msgid %ld, new dn <%s>\n",
(long) msgid,
- ( srv == NULL || srv->lud_dn == NULL ) ? "NONE" : srv->lud_dn ));
+ ( srv == NULL || srv->lud_dn == NULL ) ? "NONE" : srv->lud_dn, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"re_encode_request: new msgid %ld, new dn <%s>\n",
#ifdef LDAP_DEBUG
if ( ldap_debug & LDAP_DEBUG_PACKETS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "request", LDAP_LEVEL_DETAIL1,
- "re_encode_request: new request is:\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "re_encode_request: new request is:\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "re_encode_request new request is:\n",
0, 0, 0 );
#include <ac/unistd.h>
#include "ldap-int.h"
-
+#include "ldap_log.h"
static int ldap_abandoned LDAP_P(( LDAP *ld, ber_int_t msgid ));
static int ldap_mark_abandoned LDAP_P(( LDAP *ld, ber_int_t msgid ));
assert( result != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_ARGS, "ldap_result msgid %d\n", msgid ));
+ LDAP_LOG ( OPERATION, ARGS, "ldap_result msgid %d\n", msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_result msgid %d\n", msgid, 0, 0 );
#endif
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_ARGS,
- "ldap_chkResponseList for msgid=%d, all=%d\n", msgid, all ));
+ LDAP_LOG ( OPERATION, ARGS, "ldap_chkResponseList for msgid=%d, all=%d\n",
+ msgid, all, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_chkResponseList for msgid=%d, all=%d\n",
if ( ldap_abandoned( ld, lm->lm_msgid ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
- "ldap_chkResponseList msg abandoned, msgid %d\n", msgid ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "ldap_chkResponseList msg abandoned, msgid %d\n", msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_chkResponseList msg abandoned, msgid %d\n",
#ifdef LDAP_DEBUG
if( lm == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_RESULTS,
- "ldap_chkResponseList returns NULL\n" ));
+ LDAP_LOG ( OPERATION, RESULTS, "ldap_chkResponseList returns NULL\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_chkResponseList returns NULL\n", 0, 0, 0);
#endif
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_RESULTS,
- "ldap_chkResponseList returns msgid %d, type 0x02lu\n",
- lm->lm_msgid, (unsigned long) lm->lm_msgtype ));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "ldap_chkResponseList returns msgid %d, type 0x%02lu\n",
+ lm->lm_msgid, (unsigned long) lm->lm_msgtype, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_chkResponseList returns msgid %d, type 0x%02lu\n",
#ifdef LDAP_DEBUG
if ( timeout == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_ARGS,
- "wait4msg (infinite timeout), msgid %d\n", msgid ));
+ LDAP_LOG ( OPERATION, ARGS,
+ "wait4msg (infinite timeout), msgid %d\n", msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "wait4msg (infinite timeout), msgid %d\n",
msgid, 0, 0 );
#endif
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_ARGS,
+ LDAP_LOG ( OPERATION, ARGS,
"wait4msg (timeout %ld sec, %ld usec), msgid %d\n",
- (long) timeout->tv_sec, (long) timeout->tv_usec, msgid ));
+ (long) timeout->tv_sec, (long) timeout->tv_usec, msgid );
#else
Debug( LDAP_DEBUG_TRACE, "wait4msg (timeout %ld sec, %ld usec), msgid %d\n",
(long) timeout->tv_sec, (long) timeout->tv_usec, msgid );
while ( rc == -2 ) {
#ifdef LDAP_DEBUG
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_ARGS,
- "wait4msg continue, msgid %d, all %d\n", msgid, all ));
+ LDAP_LOG ( OPERATION, ARGS,
+ "wait4msg continue, msgid %d, all %d\n", msgid, all, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "wait4msg continue, msgid %d, all %d\n",
msgid, all, 0 );
#ifdef LDAP_DEBUG
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_ARGS,
+ LDAP_LOG ( OPERATION, ARGS,
"wait4msg: ldap_int_select returned -1: errno %d\n",
- errno ));
+ errno, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_int_select returned -1: errno %d\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
- "wait4msg: %ld secs to go\n", (long) tv.tv_sec ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "wait4msg: %ld secs to go\n", (long) tv.tv_sec, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "wait4msg: %ld secs to go\n",
(long) tv.tv_sec, 0, 0 );
assert( lc != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_ARGS, "read1msg: msgid %d, all %d\n",
- msgid, all ));
+ LDAP_LOG ( OPERATION, ARGS, "read1msg: msgid %d, all %d\n", msgid, all, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "read1msg: msgid %d, all %d\n", msgid, all, 0 );
#endif
if ( tag == LBER_DEFAULT) {
#ifdef LDAP_DEBUG
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
- "read1msg: ber_get_next failed\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "read1msg: ber_get_next failed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_CONNS,
"ber_get_next failed.\n", 0, 0, 0 );
if ( ldap_abandoned( ld, id ) ) {
ber_free( ber, 1 );
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
- "read1msg: abandoned\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1, "read1msg: abandoned\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "abandoned\n", 0, 0, 0);
#endif
if (( lr = ldap_find_request_by_msgid( ld, id )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"read1msg: no request for response with msgid %ld (tossing)\n",
- (long) id ));
+ (long) id, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"no request for response with msgid %ld (tossing)\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"read1msg: ldap_read: message type %s msgid %ld, original id %ld\n",
ldap_int_msgtype2str( tag ),
- (long) lr->lr_msgid, (long) lr->lr_origid ));
+ (long) lr->lr_msgid, (long) lr->lr_origid );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_read: message type %s msgid %ld, original id %ld\n",
if( lr->lr_status != LDAP_REQST_COMPLETED) {
lr->lr_status = LDAP_REQST_CHASINGREFS;
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"read1msg: search ref chased,"
"mark request chasing refs, id = %d\n",
- lr->lr_msgid ));
+ lr->lr_msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"read1msg: search ref chased, mark request chasing refs, id = %d\n",
rc = LDAP_DECODING_ERROR;
lr->lr_status = LDAP_REQST_COMPLETED;
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"read1msg: referral decode error,"
"mark request completed, id = %d\n",
- lr->lr_msgid ));
+ lr->lr_msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"read1msg: referral decode error, mark request completed, id = %d\n",
0, &lr->lr_res_error, &hadref );
lr->lr_status = LDAP_REQST_COMPLETED;
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"read1msg: referral chased,"
"mark request completed, id = %d\n",
- lr->lr_msgid ));
+ lr->lr_msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"read1msg: referral chased, mark request completed, id = %d\n",
&lr->lr_res_error, -1, &hadref );
lr->lr_status = LDAP_REQST_COMPLETED;
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"read1msg: V2 referral chased,"
"mark request completed, id = %d\n",
- lr->lr_msgid ));
+ lr->lr_msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"read1msg: V2 referral chased, mark request completed, id = %d\n", lr->lr_msgid, 0, 0);
lr->lr_res_errno = LDAP_PARTIAL_RESULTS;
}
#ifdef NEW_LOGGING
-LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
+LDAP_LOG ( OPERATION, DETAIL1,
"read1msg: new result: res_errno: %d, res_error: <%s>, res_matched: <%s>\n",
lr->lr_res_errno, lr->lr_res_error ? lr->lr_res_error : "",
- lr->lr_res_matched ? lr->lr_res_matched : "" ));
+ lr->lr_res_matched ? lr->lr_res_matched : "" );
#else
Debug( LDAP_DEBUG_TRACE,
"new result: res_errno: %d, res_error: <%s>, res_matched: <%s>\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
- "read1msg: %d new referrals\n", refer_cnt ));
+ LDAP_LOG ( OPERATION, DETAIL1, "read1msg: %d new referrals\n",
+ refer_cnt, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"read1msg: %d new referrals\n", refer_cnt, 0, 0 );
lr->lr_status = LDAP_REQST_COMPLETED; /* declare this request done */
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
- "read1msg: mark request completed, id = %d\n", lr->lr_msgid ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "read1msg: mark request completed, id = %d\n",
+ lr->lr_msgid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"read1msg: mark request completed, id = %d\n", lr->lr_msgid, 0, 0);
id = lr->lr_msgid;
tag = lr->lr_res_msgtype;
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
- "read1msg: request %ld done\n", (long) id ));
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "read1msg: request %ld done\n", (long) id, 0, 0 );
+ LDAP_LOG ( OPERATION, DETAIL1,
"read1msg: res_errno: %d,res_error: <%s>, res_matched: <%s>\n",
lr->lr_res_errno, lr->lr_res_error ? lr->lr_res_error : "",
- lr->lr_res_matched ? lr->lr_res_matched : "" ));
+ lr->lr_res_matched ? lr->lr_res_matched : "" );
#else
Debug( LDAP_DEBUG_ANY, "request %ld done\n",
(long) id, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"read1msg: adding response id %ld type %ld\n",
- (long) new->lm_msgid, (long) new->lm_msgtype ));
+ (long) new->lm_msgid, (long) new->lm_msgtype, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "adding response id %ld type %ld:\n",
(long) new->lm_msgid, (long) new->lm_msgtype, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_DETAIL1,
- "read1msg: merged parent (id %d) error info: result errno %d, "
- "error <%s>, matched <%s>\n", parentr->lr_msgid,
+ LDAP_LOG( OPERATION, DETAIL1, "merged parent (id %d) error info: ",
+ parentr->lr_msgid, 0, 0 );
+ LDAP_LOG( OPERATION, DETAIL1, "result errno %d, error <%s>, matched <%s>\n",
parentr->lr_res_errno, parentr->lr_res_error ?
parentr->lr_res_error : "", parentr->lr_res_matched ?
- parentr->lr_res_matched : "" ));
+ parentr->lr_res_matched : "" );
#else
Debug( LDAP_DEBUG_TRACE, "merged parent (id %d) error info: ",
parentr->lr_msgid, 0, 0 );
int type = 0;
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_ENTRY, "ldap_msgfree\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_msgfree\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_msgfree\n", 0, 0, 0 );
#endif
assert( ld != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG (( "result", LDAP_LEVEL_ENTRY, "ldap_msgdelete\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_msgdelete\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_msgdelete\n", 0, 0, 0 );
#endif
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "sasl", LDAP_LEVEL_ENTRY, "ldap_sasl_bind\n" ));
+ LDAP_LOG ( TRANSPORT, ENTRY, "ldap_sasl_bind\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_sasl_bind\n", 0, 0, 0 );
#endif
struct berval *scredp = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG (( "sasl", LDAP_LEVEL_ENTRY, "ldap_sasl_bind_s\n" ));
+ LDAP_LOG ( TRANSPORT, ENTRY, "ldap_sasl_bind_s\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_sasl_bind_s\n", 0, 0, 0 );
#endif
BerElement *ber;
#ifdef NEW_LOGGING
- LDAP_LOG (( "sasl", LDAP_LEVEL_ENTRY, "ldap_parse_sasl_bind_result\n" ));
+ LDAP_LOG ( TRANSPORT, ENTRY, "ldap_parse_sasl_bind_result\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_parse_sasl_bind_result\n", 0, 0, 0 );
#endif
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "sasl", LDAP_LEVEL_ENTRY, "ldap_pvt_sasl_getmech\n" ));
+ LDAP_LOG ( TRANSPORT, ENTRY, "ldap_pvt_sasl_getmech\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_pvt_sasl_getmech\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "sasl", LDAP_LEVEL_DETAIL1,
- "ldap_interactive_sasl_bind_s: server supports: %s\n", smechs ));
+ LDAP_LOG ( TRANSPORT, DETAIL1,
+ "ldap_interactive_sasl_bind_s: server supports: %s\n",
+ smechs, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_interactive_sasl_bind_s: server supports: %s\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "sasl", LDAP_LEVEL_DETAIL1,
- "ldap_interactive_sasl_bind_s: user selected: %s\n", mechs ));
+ LDAP_LOG ( TRANSPORT, DETAIL1,
+ "ldap_interactive_sasl_bind_s: user selected: %s\n", mechs, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldap_interactive_sasl_bind_s: user selected: %s\n",
#include "ldap-int.h"
-
/*
* ldap_simple_bind - bind to the ldap server (and X.500). The dn and
* password of the entry to which to bind are supplied. The message id
struct berval cred;
#ifdef NEW_LOGGING
- LDAP_LOG (( "sbind", LDAP_LEVEL_ENTRY, "ldap_simple_bind\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_simple_bind\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_simple_bind\n", 0, 0, 0 );
#endif
struct berval cred;
#ifdef NEW_LOGGING
- LDAP_LOG (( "sbind", LDAP_LEVEL_ENTRY, "ldap_simple_bind_s\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_simple_bind_s\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_simple_bind_s\n", 0, 0, 0 );
#endif
#include <ac/time.h>
#include "ldap-int.h"
-
+#include "ldap_log.h"
/*
* ldap_search_ext - initiate an ldap search operation.
int timelimit;
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_ENTRY, "ldap_search_ext\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_search_ext\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_search_ext\n", 0, 0, 0 );
#endif
BerElement *ber;
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_ENTRY, "ldap_search\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_search\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_search\n", 0, 0, 0 );
#endif
tls_def_ctx = SSL_CTX_new( SSLv23_method() );
if ( tls_def_ctx == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_pvt_tls_init_def_ctx: "
+ LDAP_LOG ( TRANSPORT, ERR, "ldap_pvt_tls_init_def_ctx: "
"TLS could not allocate default ctx (%d).\n",
- ERR_peek_error() ));
+ ERR_peek_error(), 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"TLS: could not allocate default ctx (%lu).\n",
!SSL_CTX_set_cipher_list( tls_def_ctx, tls_opt_ciphersuite ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_pvt_tls_init_def_ctx: "
+ LDAP_LOG ( TRANSPORT, ERR, "ldap_pvt_tls_init_def_ctx: "
"TLS could not set cipher list %s.\n",
- tls_opt_ciphersuite ));
+ tls_opt_ciphersuite, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"TLS: could not set cipher list %s.\n",
!SSL_CTX_set_default_verify_paths( tls_def_ctx ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR,
+ LDAP_LOG ( TRANSPORT, ERR,
"ldap_pvt_tls_init_def_ctx: "
"TLS could not load verify locations "
"(file:`%s',dir:`%s').\n",
tls_opt_cacertfile ? tls_opt_cacertfile : "",
- tls_opt_cacertdir ? tls_opt_cacertdir : "" ));
+ tls_opt_cacertdir ? tls_opt_cacertdir : "", 0 );
#else
Debug( LDAP_DEBUG_ANY, "TLS: "
"could not load verify locations (file:`%s',dir:`%s').\n",
calist = get_ca_list( tls_opt_cacertfile, tls_opt_cacertdir );
if ( !calist ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_pvt_tls_init_def_ctx: "
+ LDAP_LOG ( TRANSPORT, ERR, "ldap_pvt_tls_init_def_ctx: "
"TLS could not load client CA list (file: `%s',dir:`%s')\n",
tls_opt_cacertfile ? tls_opt_cacertfile : "",
- tls_opt_cacertdir ? tls_opt_cacertdir : "" ));
+ tls_opt_cacertdir ? tls_opt_cacertdir : "", 0 );
#else
Debug( LDAP_DEBUG_ANY, "TLS: "
"could not load client CA list (file:`%s',dir:`%s').\n",
tls_opt_keyfile, SSL_FILETYPE_PEM ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_pvt_tls_init_def_ctx: "
- "TLS could not use key file `%s'.\n", tls_opt_keyfile ));
+ LDAP_LOG ( TRANSPORT, ERR, "ldap_pvt_tls_init_def_ctx: "
+ "TLS could not use key file `%s'.\n", tls_opt_keyfile, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"TLS: could not use key file `%s'.\n",
tls_opt_certfile, SSL_FILETYPE_PEM ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_pvt_tls_init_def_ctx: "
- "TLS could not use certificate `%s'.\n", tls_opt_certfile ));
+ LDAP_LOG ( TRANSPORT, ERR, "ldap_pvt_tls_init_def_ctx: "
+ "TLS could not use certificate `%s'.\n",
+ tls_opt_certfile, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"TLS: could not use certificate `%s'.\n",
!SSL_CTX_check_private_key( tls_def_ctx ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_pvt_tls_init_def_ctx: "
- "TLS private key mismatch.\n" ));
+ LDAP_LOG ( TRANSPORT, ERR,
+ "ldap_pvt_tls_init_def_ctx: TLS private key mismatch.\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"TLS: private key mismatch.\n",
ssl = SSL_new( ctx );
if ( ssl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "alloc_handle: "
- "TLS can't create ssl handle.\n" ));
+ LDAP_LOG ( TRANSPORT, ERR,
+ "alloc_handle: TLS can't create ssl handle.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,"TLS: can't create ssl handle.\n",0,0,0);
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_int_tls_connect: "
- "TLS can't connect.\n" ));
+ LDAP_LOG ( TRANSPORT, ERR,
+ "ldap_int_tls_connect: TLS can't connect.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,"TLS: can't connect.\n",0,0,0);
#endif
if ( update_flags( sb, ssl, err )) return 1;
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_pvt_tls_accept: "
- "TLS can't accept.\n" ));
+ LDAP_LOG ( TRANSPORT, ERR,
+ "ldap_pvt_tls_accept: TLS can't accept.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,"TLS: can't accept.\n",0,0,0 );
#endif
x = tls_get_cert((SSL *)s);
if (!x) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_pvt_tls_check_hostname: "
- "TLS unable to get peer certificate.\n" ));
+ LDAP_LOG ( TRANSPORT, ERR,
+ "ldap_pvt_tls_check_hostname: "
+ "TLS unable to get peer certificate.\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"TLS: unable to get peer certificate.\n",
buf, sizeof(buf)) == -1)
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_pvt_tls_check_hostname: "
- "TLS unable to get common name from peer certificate.\n" ));
+ LDAP_LOG ( TRANSPORT, ERR, "ldap_pvt_tls_check_hostname: "
+ "TLS unable to get common name from peer certificate.\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"TLS: unable to get common name from peer certificate.\n",
} else if (strcasecmp(name, buf)) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "ldap_pvt_tls_check_hostname: "
+ LDAP_LOG ( TRANSPORT, ERR, "ldap_pvt_tls_check_hostname: "
"TLS hostname (%s) does not match "
- "common name in certificate (%s).\n", name, buf ));
+ "common name in certificate (%s).\n", name, buf, 0 );
#else
Debug( LDAP_DEBUG_ANY, "TLS: hostname (%s) does not match "
"common name in certificate (%s).\n",
if ( where & SSL_CB_LOOP ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_DETAIL1, "tls_info_cb: "
- "TLS trace: %s:%s\n", op, SSL_state_string_long( ssl ) ));
+ LDAP_LOG ( TRANSPORT, DETAIL1, "tls_info_cb: "
+ "TLS trace: %s:%s\n", op, SSL_state_string_long( ssl ), 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"TLS trace: %s:%s\n",
} else if ( where & SSL_CB_ALERT ) {
op = ( where & SSL_CB_READ ) ? "read" : "write";
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_DETAIL1, "tls_info_cb: "
- "TLS trace: SSL3 alert %s:%s:%s\n", op,
- SSL_alert_type_string_long( ret ),
- SSL_alert_desc_string_long( ret) ));
+ LDAP_LOG ( TRANSPORT, DETAIL1,
+ "tls_info_cb: TLS trace: SSL3 alert %s:%s:%s\n",
+ op, SSL_alert_type_string_long( ret ),
+ SSL_alert_desc_string_long( ret) );
#else
Debug( LDAP_DEBUG_TRACE,
"TLS trace: SSL3 alert %s:%s:%s\n",
} else if ( where & SSL_CB_EXIT ) {
if ( ret == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "tls_info_cb: "
- "TLS trace: %s:failed in %s\n", op, SSL_state_string_long( ssl ) ));
+ LDAP_LOG ( TRANSPORT, ERR,
+ "tls_info_cb: TLS trace: %s:failed in %s\n",
+ op, SSL_state_string_long( ssl ), 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"TLS trace: %s:failed in %s\n",
#endif
} else if ( ret < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "tls_info_cb: "
- "TLS trace: %s:error in %s\n", op, SSL_state_string_long( ssl ) ));
+ LDAP_LOG ( TRANSPORT, ERR,
+ "tls_info_cb: TLS trace: %s:error in %s\n",
+ op, SSL_state_string_long( ssl ), 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"TLS trace: %s:error in %s\n",
sname = X509_NAME_oneline( subject, NULL, 0 );
iname = X509_NAME_oneline( issuer, NULL, 0 );
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "tls_verify_cb"
- "TLS certificate verification: depth: %d, err: %d: "
- "subject: %s, issuer: %s\n", errdepth, errnum,
- sname ? sname : "-unknown-", iname ? iname : "-unknown-" ));
+ LDAP_LOG( TRANSPORT, ERR,
+ "TLS certificate verification: depth: %d, err: %d, subject: %s,",
+ errdepth, errnum,
+ sname ? sname : "-unknown-" );
+ LDAP_LOG( TRANSPORT, ERR, " issuer: %s\n", iname ? iname : "-unknown-", 0, 0 );
if ( !ok ) {
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR, "TLS certificate verification: Error, %s\n",
- X509_verify_cert_error_string(errnum)));
+ LDAP_LOG ( TRANSPORT, ERR,
+ "TLS certificate verification: Error, %s\n",
+ X509_verify_cert_error_string(errnum), 0, 0 );
}
#else
Debug( LDAP_DEBUG_TRACE,
while ( ( l = ERR_get_error_line( &file, &line ) ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR,
+ LDAP_LOG ( TRANSPORT, ERR,
"tls_report_error: TLS %s %s:%d\n",
- ERR_error_string( l, buf ), file, line ));
+ ERR_error_string( l, buf ), file, line );
#else
Debug( LDAP_DEBUG_ANY, "TLS: %s %s:%d\n",
ERR_error_string( l, buf ), file, line );
if ( !tmp_rsa ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_ERR,
- "tls_tmp_rsa_cb: TLS Failed to generate temporary %d-bit %s RSA key\n",
- key_length, is_export ? "export" : "domestic" ));
+ LDAP_LOG ( TRANSPORT, ERR,
+ "tls_tmp_rsa_cb: TLS Failed to generate temporary %d-bit %s "
+ "RSA key\n", key_length, is_export ? "export" : "domestic", 0 );
#else
Debug( LDAP_DEBUG_ANY,
"TLS: Failed to generate temporary %d-bit %s RSA key\n",
if (randfile == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( TRANSPORT, DETAIL1,
"tls_seed_PRNG: TLS Use configuration file or "
- "$RANDFILE to define seed PRNG\n" ));
+ "$RANDFILE to define seed PRNG\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"TLS: Use configuration file or $RANDFILE to define seed PRNG\n",
if (RAND_status() == 0) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tls", LDAP_LEVEL_DETAIL1,
- "tls_seed_PRNG: TLS PRNG not been seeded with enough data\n" ));
+ LDAP_LOG ( TRANSPORT, DETAIL1,
+ "tls_seed_PRNG: TLS PRNG not been seeded with enough data\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"TLS: PRNG not been seeded with enough data\n",
ldap_unbind( LDAP *ld )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "unbind", LDAP_LEVEL_ENTRY, "ldap_unbind\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_unbind\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_unbind\n", 0, 0, 0 );
#endif
BerElement *ber;
#ifdef NEW_LOGGING
- LDAP_LOG (( "unbind", LDAP_LEVEL_ENTRY, "ldap_send_unbind\n" ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_send_unbind\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_send_unbind\n", 0, 0, 0 );
#endif
#include "ldap-int.h"
-
/* local functions */
static const char* skip_url_prefix LDAP_P((
const char *url,
* the options and cause infinite recursion
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "url", LDAP_LEVEL_ENTRY, "ldap_url_parse_ext(%s)\n", url_in ));
+ LDAP_LOG ( OPERATION, ENTRY, "ldap_url_parse_ext(%s)\n", url_in, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldap_url_parse_ext(%s)\n", url_in, 0, 0 );
#endif
UNIX_SRCS = detach.c
UNIX_OBJS = detach.o
-SRCS = base64.c csn.c debug.c entropy.c sasl.c signal.c hash.c \
+SRCS = base64.c csn.c entropy.c sasl.c signal.c hash.c \
md5.c passwd.c sha1.c getpass.c lockf.c utils.c uuid.c sockpair.c \
@LIBSRCS@ $(@PLAT@_SRCS)
-OBJS = base64.o csn.o debug.o entropy.o sasl.o signal.o hash.o \
+OBJS = base64.o csn.o entropy.o sasl.o signal.o hash.o \
md5.o passwd.o sha1.o getpass.o lockf.o utils.o uuid.o sockpair.o \
@LIBOBJS@ $(@PLAT@_OBJS)
#include <ac/stdlib.h>
#include <ac/string.h>
#include <ac/time.h>
+#include <ac/ctype.h>
#ifdef LDAP_SYSLOG
#include <ac/syslog.h>
int level;
};
-static struct DEBUGLEVEL **levelArray;
+int ldap_loglevels[LDAP_SUBSYS_NUM];
static long numLevels = 0;
static FILE *log_file = NULL;
"results", "detail1", "detail2",
NULL};
+static char *lutil_subsys[LDAP_SUBSYS_NUM] = {"global","operation", "transport",
+ "connection", "filter", "ber",
+ "config", "acl", "cache", "index",
+ "ldif", "tools", "slapd", "slurpd",
+ "backend", "back_bdb", "back_ldbm",
+ "back_ldap", "back_meta", "back_mon" };
+
+int lutil_mnem2subsys( const char *subsys )
+{
+ int i;
+ for( i = 0; i < LDAP_SUBSYS_NUM; i++ )
+ {
+ if ( !strcasecmp( subsys, lutil_subsys[i] ) )
+ {
+ return i;
+ }
+ }
+ return 0;
+}
+
+void lutil_set_all_backends( level )
+{
+ int i;
+
+ for( i = 0; i < LDAP_SUBSYS_NUM; i++ )
+ {
+ if ( !strncasecmp( "back_", lutil_subsys[i], strlen("back_") ) )
+ {
+ ldap_loglevels[i] = level;
+ }
+ }
+}
+
int lutil_mnem2level( const char *level )
{
int i;
static void addSubsys( const char *subsys, int level )
{
- int i, j;
-
- if ( !strcasecmp( subsys, "global") ) global_level = level;
+ int i, j, subsys_num;
- for( i = 0; i < numLevels; i++ )
- {
- if ( levelArray[i] == NULL )
- {
- levelArray[i] = (struct DEBUGLEVEL*)ber_memalloc( sizeof( struct DEBUGLEVEL ) );
- levelArray[i]->subsystem = (char*)ber_memalloc( strlen( subsys ) + 1 );
- strcpy ( levelArray[i]->subsystem, subsys );
- levelArray[i]->level = level;
- return;
- }
- if( !strcasecmp( subsys, levelArray[i]->subsystem ) )
- {
- levelArray[i]->level = level;
- return;
- }
- }
- levelArray = (struct DEBUGLEVEL**)ber_memrealloc( levelArray, sizeof( struct DEBUGLEVEL* ) * (numLevels + 10) );
- for( j = numLevels; j < (numLevels + 10); j++ )
+ if ( !strcasecmp( subsys, "backend" ) )
+ lutil_set_all_backends( level );
+ else
{
- levelArray[j] = NULL;
+ subsys_num = lutil_mnem2subsys(subsys);
+ ldap_loglevels[subsys_num] = level;
}
- numLevels += 10;
- levelArray[i] = (struct DEBUGLEVEL*)ber_memalloc( sizeof( struct DEBUGLEVEL ) );
- levelArray[i]->subsystem = (char*)ber_memalloc( strlen( subsys ) + 1 );
- strcpy( levelArray[i]->subsystem, subsys );
- levelArray[i]->level = level;
return;
}
struct tm *today;
#endif
int i;
+ char data[4096];
+ char * t_subsys;
+ char * tmp;
- if ( levelArray == NULL ) return; /* logging isn't set up */
-
- /*
- * Look for the subsystem in the level array. When we find it,
- * break out of the loop.
- */
- for( i = 0; i < numLevels; i++ ) {
- if ( levelArray[i] == NULL ) break;
- if ( ! strcasecmp( levelArray[i]->subsystem, subsys ) ) break;
- }
-
- /*
- * If we didn't find the subsystem, or the set level is less than
- * the requested output level, don't output it.
- */
- if ( (level > global_level) &&
- ((i > numLevels ) || (levelArray[i] == NULL) || ( level > levelArray[i]->level )) )
- {
- return;
- }
+ t_subsys = strdup(subsys);
+
+ for(tmp = t_subsys, i = 0; i < strlen(t_subsys); i++, tmp++)
+ *tmp = TOUPPER( (unsigned char) *tmp );
#ifdef LDAP_SYSLOG
/* we're configured to use syslog */
/*
* format the output data.
*/
+
+ fprintf(file, "\n%s:: ", t_subsys );
vfprintf( file, fmt, vl );
+ fflush( file );
}
/*
* level of the log output and the format and data. Send this on to the
* internal routine with the print file, if any.
*/
-void lutil_log( const char *subsys, int level, const char *fmt, ... )
+void lutil_log( const int subsys, int level, const char *fmt, ... )
{
FILE* outfile = NULL;
va_list vl;
va_start( vl, fmt );
ber_get_option( NULL, LBER_OPT_LOG_PRINT_FILE, &outfile );
- lutil_log_int( outfile, subsys, level, fmt, vl );
+ lutil_log_int( outfile, lutil_subsys[subsys], level, fmt, vl );
va_end( vl );
}
*/
for( i = 0; i < argc; i++ )
{
- char *next = argv[i];
- if ( i < argc-1 && next[0] == '-' && next[1] == 'd' )
- {
- char subsys[64];
- int level;
- char *optarg = argv[i+1];
- char *index = strchr( optarg, '=' );
- if ( index != NULL )
- {
- *index = 0;
- strcpy ( subsys, optarg );
- level = atoi( index+1 );
- if ( level <= 0 ) level = lutil_mnem2level( index + 1 );
- lutil_set_debug_level( subsys, level );
- *index = '=';
- }
- else
- {
- global_level = atoi( optarg );
- /*
- * if a negative number was used, make the global level the
- * maximum sane level.
- */
- if ( global_level < 0 ) global_level = 65535;
- }
- }
+ char *next = argv[i];
+
+ if ( i < argc-1 && next[0] == '-' && next[1] == 'd' )
+ {
+ char subsys[64];
+ int level;
+ char *optarg = argv[i+1];
+ char *index = strchr( optarg, '=' );
+ if ( index != NULL )
+ {
+ *index = 0;
+ strcpy ( subsys, optarg );
+ level = atoi( index+1 );
+ if ( level <= 0 ) level = lutil_mnem2level( index + 1 );
+ lutil_set_debug_level( subsys, level );
+ *index = '=';
+ }
+ else
+ {
+ global_level = atoi( optarg );
+ ldap_loglevels[0] = global_level;
+ /*
+ * if a negative number was used, make the global level the
+ * maximum sane level.
+ */
+ if ( global_level < 0 )
+ {
+ global_level = 65535;
+ ldap_loglevels[0] = 65535;
+ }
+ }
+ }
}
}
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY, "conn: %d do_abandon\n",
- conn->c_connid));
+ LDAP_LOG( OPERATION, ENTRY, "conn: %d do_abandon\n", conn->c_connid, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE, "do_abandon\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "i", &id ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "conn: %d do_abandon: ber_scanf failed\n",
- conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "conn: %d do_abandon: ber_scanf failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_abandon: ber_scanf failed\n", 0, 0 ,0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_abandon: conn: %d id=%ld\n", conn->c_connid, (long) id ));
+ LDAP_LOG( OPERATION, ARGS, "do_abandon: conn: %d id=%ld\n",
+ conn->c_connid, (long) id, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "do_abandon: id=%ld\n", (long) id, 0 ,0 );
#endif
if( id <= 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_abandon: conn: %d bad msgid %ld\n", conn->c_connid, (long) id ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_abandon: conn: %d bad msgid %ld\n",
+ conn->c_connid, (long) id, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_abandon: bad msgid %ld\n", (long) id, 0, 0 );
ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( OPERATION, ENTRY,
"do_abandon: conn: %d op=%ld %sfound\n",
- conn->c_connid, (long)id, o ? "" : "not " ));
+ conn->c_connid, (long)id, o ? "" : "not " );
#else
Debug( LDAP_DEBUG_TRACE, "do_abandon: op=%ld %sfound\n",
(long) id, o ? "" : "not ", 0 );
#define ACL_BUF_SIZE 1024 /* use most appropriate size */
-
/*
* speed up compares
*/
int ret = 1;
int count;
AccessControl *a;
+
#ifdef LDAP_DEBUG
char accessmaskbuf[ACCESSMASK_MAXLEN];
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
- "access_allowed: conn %lu %s access to \"%s\" \"%s\" requested\n",
- conn ? conn->c_connid : -1, access2str( access ), e->e_dn, attr ));
+ LDAP_LOG( ACL, ENTRY,
+ "access_allowed: %s access to \"%s\" \"%s\" requested\n",
+ access2str( access ), e->e_dn, attr );
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: %s access to \"%s\" \"%s\" requested\n",
/* grant database root access */
if ( be != NULL && be_isroot( be, &op->o_ndn ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
- "access_allowed: conn %lu root access granted\n",
- conn->c_connid));
+ LDAP_LOG( ACL, INFO,
+ "access_allowed: conn %lu root access granted\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= root access granted\n",
&& desc != slap_schema.si_ad_children )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %lu NoUserMod Operational attribute: %s access granted\n",
- conn->c_connid, attr ));
+ LDAP_LOG( ACL, DETAIL1,
+ "access_allowed: conn %lu NoUserMod Operational attribute: %s "
+ "access granted\n", conn->c_connid, attr , 0 );
#else
Debug( LDAP_DEBUG_ACL, "NoUserMod Operational attribute:"
" %s access granted\n",
/* use backend default access if no backend acls */
if( be != NULL && be->be_acl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %lu backend default %s access %s to \"%s\"\n",
- conn->c_connid, access2str( access ),
- be->be_dfltaccess >= access ? "granted" : "denied", op->o_dn.bv_val ));
+ LDAP_LOG( ACL, DETAIL1,
+ "access_allowed: backend default %s access %s to \"%s\"\n",
+ access2str( access ),
+ be->be_dfltaccess >= access ? "granted" : "denied",
+ op->o_dn.bv_val );
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: backend default %s access %s to \"%s\"\n",
/* use global default access if no global acls */
} else if ( be == NULL && global_acl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %lu global default %s access %s to \"%s\"\n",
- conn->c_connid, access2str( access ),
- global_default_access >= access ? "granted" : "denied", op->o_dn.bv_val ));
+ LDAP_LOG( ACL, DETAIL1,
+ "access_allowed: global default %s access %s to \"%s\"\n",
+ access2str( access ),
+ global_default_access >= access ? "granted" : "denied",
+ op->o_dn.bv_val );
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: global default %s access %s to \"%s\"\n",
for (i = 0; i < MAXREMATCHES && matches[i].rm_so > 0; i++) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %lu match[%d]: %d %d ",
- conn->c_connid, i,
- (int)matches[i].rm_so, (int)matches[i].rm_eo ));
+ LDAP_LOG( ACL, DETAIL1,
+ "access_allowed: match[%d]: %d %d ",
+ i, (int)matches[i].rm_so, (int)matches[i].rm_eo );
#else
Debug( LDAP_DEBUG_ACL, "=> match[%d]: %d %d ", i,
(int)matches[i].rm_so, (int)matches[i].rm_eo );
}
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_ARGS, "\n" ));
+ LDAP_LOG( ACL, ARGS, "\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "\n", 0, 0, 0 );
#endif
if ( ACL_IS_INVALID( mask ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %lu \"%s\" (%s) invalid!\n",
- conn->c_connid, e->e_dn, attr ));
+ LDAP_LOG( ACL, DETAIL1,
+ "access_allowed: conn %lu \"%s\" (%s) invalid!\n",
+ conn->c_connid, e->e_dn, attr );
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: \"%s\" (%s) invalid!\n",
} else if ( control == ACL_BREAK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "access_allowed: conn %lu no more rules\n",
- conn->c_connid ));
+ LDAP_LOG( ACL, DETAIL1,
+ "access_allowed: conn %lu no more rules\n", conn->c_connid, 0,0 );
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: no more rules\n", 0, 0, 0);
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
- "access_allowed: conn %lu %s access %s by %s\n",
- conn->c_connid,
- access2str( access ),
- ACL_GRANT( mask, access ) ? "granted" : "denied",
- accessmask2str( mask, accessmaskbuf ) ));
+ LDAP_LOG( ACL, ENTRY,
+ "access_allowed: %s access %s by %s\n",
+ access2str( access ), ACL_GRANT( mask, access ) ? "granted" : "denied",
+ accessmask2str( mask, accessmaskbuf ) );
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: %s access %s by %s\n",
if ( a->acl_dn_pat.bv_len || ( a->acl_dn_style != ACL_STYLE_REGEX )) {
if ( a->acl_dn_style == ACL_STYLE_REGEX ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_get: dnpat [%d] %s nsub: %d\n",
- *count, a->acl_dn_pat.bv_val, (int) a->acl_dn_re.re_nsub ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_get: dnpat [%d] %s nsub: %d\n",
+ *count, a->acl_dn_pat.bv_val,
+ (int) a->acl_dn_re.re_nsub );
#else
Debug( LDAP_DEBUG_ACL, "=> dnpat: [%d] %s nsub: %d\n",
*count, a->acl_dn_pat.bv_val, (int) a->acl_dn_re.re_nsub );
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_get: dn [%d] %s\n",
- *count, a->acl_dn_pat.bv_val ));
+ LDAP_LOG( ACL, DETAIL1, "acl_get: dn [%d] %s\n",
+ *count, a->acl_dn_pat.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ACL, "=> dn: [%d] %s\n",
*count, a->acl_dn_pat.bv_val, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_get: [%d] matched\n",
- *count ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_get: [%d] matched\n", *count, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL, "=> acl_get: [%d] matched\n",
*count, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_get: [%d] check attr %s\n",
- *count, attr ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_get: [%d] check attr %s\n", *count, attr ,0 );
#else
Debug( LDAP_DEBUG_ACL, "=> acl_get: [%d] check attr %s\n",
*count, attr, 0);
ad_inlist( desc, a->acl_attrs ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_get: [%d] acl %s attr: %s\n",
- *count, e->e_dn, attr ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_get: [%d] acl %s attr: %s\n", *count, e->e_dn, attr );
#else
Debug( LDAP_DEBUG_ACL,
"<= acl_get: [%d] acl %s attr: %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
- "acl_get: done.\n" ));
+ LDAP_LOG( ACL, RESULTS, "acl_get: done.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL, "<= acl_get: done.\n", 0, 0, 0 );
#endif
assert( attr != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_ENTRY,
- "acl_mask: conn %lu access to entry \"%s\", attr \"%s\" requested\n",
- conn->c_connid, e->e_dn, attr ));
-
- LDAP_LOG(( "acl", LDAP_LEVEL_ARGS,
- " to %s by \"%s\", (%s) \n",
- val ? "value" : "all values",
- op->o_ndn.bv_val ? op->o_ndn.bv_val : "",
- accessmask2str( *mask, accessmaskbuf ) ));
+ LDAP_LOG( ACL, ENTRY,
+ "acl_mask: conn %lu access to entry \"%s\", attr \"%s\" requested\n",
+ conn->c_connid, e->e_dn, attr );
+
+ LDAP_LOG( ACL, ARGS,
+ " to %s by \"%s\", (%s) \n", val ? "value" : "all values",
+ op->o_ndn.bv_val ? op->o_ndn.bv_val : "",
+ accessmask2str( *mask, accessmaskbuf ) );
#else
Debug( LDAP_DEBUG_ACL,
"=> acl_mask: access to entry \"%s\", attr \"%s\" requested\n",
/* AND <who> clauses */
if ( b->a_dn_pat.bv_len != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %lu check a_dn_pat: %s\n",
- conn->c_connid, b->a_dn_pat.bv_val ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_mask: conn %lu check a_dn_pat: %s\n",
+ conn->c_connid, b->a_dn_pat.bv_val ,0 );
#else
Debug( LDAP_DEBUG_ACL, "<= check a_dn_pat: %s\n",
b->a_dn_pat.bv_val, 0, 0);
if ( b->a_sockurl_pat.bv_len ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( ACL, DETAIL1,
"acl_mask: conn %lu check a_sockurl_pat: %s\n",
- conn->c_connid, b->a_sockurl_pat.bv_val ));
+ conn->c_connid, b->a_sockurl_pat.bv_val , 0 );
#else
Debug( LDAP_DEBUG_ACL, "<= check a_sockurl_pat: %s\n",
b->a_sockurl_pat.bv_val, 0, 0 );
if ( b->a_domain_pat.bv_len ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( ACL, DETAIL1,
"acl_mask: conn %lu check a_domain_pat: %s\n",
- conn->c_connid, b->a_domain_pat.bv_val ));
+ conn->c_connid, b->a_domain_pat.bv_val , 0 );
#else
Debug( LDAP_DEBUG_ACL, "<= check a_domain_pat: %s\n",
b->a_domain_pat.bv_val, 0, 0 );
if ( b->a_peername_pat.bv_len ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( ACL, DETAIL1,
"acl_mask: conn %lu check a_perrname_path: %s\n",
- conn->c_connid, b->a_peername_pat.bv_val ));
+ conn->c_connid, b->a_peername_pat.bv_val , 0 );
#else
Debug( LDAP_DEBUG_ACL, "<= check a_peername_path: %s\n",
b->a_peername_pat.bv_val, 0, 0 );
if ( b->a_sockname_pat.bv_len ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( ACL, DETAIL1,
"acl_mask: conn %lu check a_sockname_path: %s\n",
- conn->c_connid, b->a_sockname_pat.bv_val ));
+ conn->c_connid, b->a_sockname_pat.bv_val , 0 );
#else
Debug( LDAP_DEBUG_ACL, "<= check a_sockname_path: %s\n",
b->a_sockname_pat.bv_val, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( ACL, DETAIL1,
"acl_mask: conn %lu check a_dn_pat: %s\n",
- conn->c_connid, attr ));
+ conn->c_connid, attr , 0 );
#else
Debug( LDAP_DEBUG_ACL, "<= check a_dn_at: %s\n",
attr, 0, 0);
if ( b->a_authz.sai_ssf ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %lu check a_authz.sai_ssf: ACL %u > OP %u\n",
- conn->c_connid, b->a_authz.sai_ssf, op->o_ssf ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_mask: conn %lu check a_authz.sai_ssf: ACL %u > OP %u\n",
+ conn->c_connid, b->a_authz.sai_ssf, op->o_ssf );
#else
Debug( LDAP_DEBUG_ACL, "<= check a_authz.sai_ssf: ACL %u > OP %u\n",
b->a_authz.sai_ssf, op->o_ssf, 0 );
if ( b->a_authz.sai_transport_ssf ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %lu check a_authz.sai_transport_ssf: ACL %u > OP %u\n",
- conn->c_connid, b->a_authz.sai_transport_ssf, op->o_transport_ssf ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_mask: conn %lu check a_authz.sai_transport_ssf: "
+ "ACL %u > OP %u\n",
+ conn->c_connid, b->a_authz.sai_transport_ssf,
+ op->o_transport_ssf );
#else
Debug( LDAP_DEBUG_ACL,
"<= check a_authz.sai_transport_ssf: ACL %u > OP %u\n",
if ( b->a_authz.sai_tls_ssf ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %lu check a_authz.sai_tls_ssf: ACL %u > OP %u\n",
- conn->c_connid, b->a_authz.sai_tls_ssf, op->o_tls_ssf ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_mask: conn %lu check a_authz.sai_tls_ssf: ACL %u > "
+ "OP %u\n",
+ conn->c_connid, b->a_authz.sai_tls_ssf, op->o_tls_ssf );
#else
Debug( LDAP_DEBUG_ACL,
"<= check a_authz.sai_tls_ssf: ACL %u > OP %u\n",
if ( b->a_authz.sai_sasl_ssf ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
- "acl_mask: conn %lu check a_authz.sai_sasl_ssf: ACL %u > OP %u\n",
- conn->c_connid, b->a_authz.sai_sasl_ssf, op->o_sasl_ssf ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_mask: conn %lu check a_authz.sai_sasl_ssf: "
+ "ACL %u > OP %u\n",
+ conn->c_connid, b->a_authz.sai_sasl_ssf, op->o_sasl_ssf );
#else
Debug( LDAP_DEBUG_ACL,
"<= check a_authz.sai_sasl_ssf: ACL %u > OP %u\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_RESULTS,
- "acl_mask: conn %lu [%d] applying %s (%s)\n",
- conn->c_connid, i, accessmask2str( modmask, accessmaskbuf),
+ LDAP_LOG( ACL, RESULTS,
+ "acl_mask: [%d] applying %s (%s)\n",
+ i, accessmask2str( modmask, accessmaskbuf),
b->a_type == ACL_CONTINUE ? "continue" : b->a_type == ACL_BREAK
- ? "break" : "stop" ));
+ ? "break" : "stop" );
#else
Debug( LDAP_DEBUG_ACL,
"<= acl_mask: [%d] applying %s (%s)\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( ACL, DETAIL1,
"acl_mask: conn %lu [%d] mask: %s\n",
- conn->c_connid, i, accessmask2str( *mask, accessmaskbuf) ));
+ conn->c_connid, i, accessmask2str( *mask, accessmaskbuf) );
#else
Debug( LDAP_DEBUG_ACL,
"<= acl_mask: [%d] mask: %s\n",
ACL_INIT(*mask);
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_RESULTS,
+ LDAP_LOG( ACL, RESULTS,
"acl_mask: conn %lu no more <who> clauses, returning %d (stop)\n",
- conn->c_connid, accessmask2str( *mask, accessmaskbuf) ));
+ conn->c_connid, accessmask2str( *mask, accessmaskbuf) , 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= acl_mask: no more <who> clauses, returning %s (stop)\n",
/* short circuit root database access */
if ( be_isroot( be, &op->o_ndn ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( ACL, DETAIL1,
"acl_check_modlist: conn %lu access granted to root user\n",
- conn->c_connid ));
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= acl_access_allowed: granted to database root\n",
/* use backend default access if no backend acls */
if( be != NULL && be->be_acl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
- "acl_check_modlist: conn %lu backend default %s access %s to \"%s\"\n",
- conn->c_connid, access2str( ACL_WRITE ),
- be->be_dfltaccess >= ACL_WRITE ? "granted" : "denied", op->o_dn.bv_val ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_check_modlist: backend default %s access %s to \"%s\"\n",
+ access2str( ACL_WRITE ),
+ be->be_dfltaccess >= ACL_WRITE ? "granted" : "denied",
+ op->o_dn.bv_val );
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: backend default %s access %s to \"%s\"\n",
/* use global default access if no global acls */
} else if ( be == NULL && global_acl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
- "acl_check_modlist: conn %lu global default %s access %s to \"%s\"\n",
- conn->c_connid, access2str( ACL_WRITE ),
- global_default_access >= ACL_WRITE ? "granted" : "denied", op->o_dn ));
+ LDAP_LOG( ACL, DETAIL1,
+ "acl_check_modlist: global default %s access %s to \"%s\"\n",
+ access2str( ACL_WRITE ),
+ global_default_access >= ACL_WRITE ? "granted" : "denied",
+ op->o_dn );
#else
Debug( LDAP_DEBUG_ACL,
"=> access_allowed: global default %s access %s to \"%s\"\n",
*/
if ( is_at_no_user_mod( mlist->sml_desc->ad_type ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( ACL, DETAIL1,
"acl_check_modlist: conn %lu no-user-mod %s: modify access granted\n",
- conn->c_connid, mlist->sml_desc->ad_cname.bv_val ));
+ conn->c_connid, mlist->sml_desc->ad_cname.bv_val , 0 );
#else
Debug( LDAP_DEBUG_ACL, "acl: no-user-mod %s:"
" modify access granted\n",
bv->bv_len = size;
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
- "string_expand: pattern = %.*s\n", (int)pat->bv_len, pat->bv_val ));
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL1,
- "string_expand: expanded = %s\n", bv->bv_val ));
+ LDAP_LOG( ACL, DETAIL1,
+ "string_expand: pattern = %.*s\n", (int)pat->bv_len, pat->bv_val, 0 );
+ LDAP_LOG( ACL, DETAIL1, "string_expand: expanded = %s\n", bv->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> string_expand: pattern: %.*s\n", (int)pat->bv_len, pat->bv_val, 0 );
Debug( LDAP_DEBUG_TRACE, "=> string_expand: expanded: %s\n", bv->bv_val, 0, 0 );
regerror(rc, &re, error, sizeof(error));
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_ERR,
+ LDAP_LOG( ACL, ERR,
"regex_matches: compile( \"%s\", \"%s\") failed %s\n",
- pat->bv_val, str, error ));
+ pat->bv_val, str, error );
#else
Debug( LDAP_DEBUG_TRACE,
"compile( \"%s\", \"%s\") failed %s\n",
regfree( &re );
#ifdef NEW_LOGGING
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL2,
- "regex_matches: string: %s\n", str ));
- LDAP_LOG(( "aci", LDAP_LEVEL_DETAIL2,
- "regex_matches: rc: %d %s\n",
- rc, rc ? "matches" : "no matches" ));
+ LDAP_LOG( ACL, DETAIL2, "regex_matches: string: %s\n", str, 0, 0 );
+ LDAP_LOG( ACL, DETAIL2, "regex_matches: rc: %d %s\n",
+ rc, rc ? "matches" : "no matches", 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"=> regex_matches: string: %s\n", str, 0, 0 );
int manageDSAit;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_add: conn %d enter\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ENTRY, "do_add: conn %d enter\n", conn->c_connid,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_add\n", 0, 0, 0 );
#endif
/* get the name */
if ( ber_scanf( ber, "{m", /*}*/ &dn ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_add: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_add: conn %d ber_scanf failed\n", conn->c_connid,0,0 );
#else
Debug( LDAP_DEBUG_ANY, "do_add: ber_scanf failed\n", 0, 0, 0 );
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_add: conn %d invalid dn (%s)\n", conn->c_connid,
- dn.bv_val ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_add: conn %d invalid dn (%s)\n", conn->c_connid, dn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_add: invalid dn (%s)\n", dn.bv_val, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_add: conn %d dn (%s)\n", conn->c_connid, e->e_dn ));
+ LDAP_LOG( OPERATION, ARGS,
+ "do_add: conn %d dn (%s)\n", conn->c_connid, e->e_dn, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "do_add: dn (%s)\n", e->e_dn, 0, 0 );
#endif
if ( rtag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_add: conn %d decoding error \n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_add: conn %d decoding error \n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_add: decoding error\n", 0, 0, 0 );
#endif
if ( tmp.sml_bvalues == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_add: conn %d no values for type %s\n",
- conn->c_connid, tmp.sml_type.bv_val ));
+ conn->c_connid, tmp.sml_type.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY, "no values for type %s\n",
tmp.sml_type.bv_val, 0, 0 );
if ( ber_scanf( ber, /*{*/ "}") == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_add: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_add: conn %d ber_scanf failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_add: ber_scanf failed\n", 0, 0, 0 );
#endif
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_add: conn %d get_ctrls failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, INFO,
+ "do_add: conn %d get_ctrls failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_add: get_ctrls failed\n", 0, 0, 0 );
#endif
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_add: conn %d no backend support\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, INFO,
+ "do_add: conn %d no backend support\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, " do_add: no backend support\n", 0, 0, 0 );
#endif
if( rtag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "get_ava: ber_scanf failure\n" ));
+ LDAP_LOG( FILTER, ERR, "get_ava: ber_scanf failure\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " get_ava ber_scanf\n", 0, 0, 0 );
#endif
#endif
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_ARGS, "==> bdb_add: %s\n", e->e_dn ));
+ LDAP_LOG ( OPERATION, ARGS, "==> bdb_add: %s\n", e->e_dn, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "==> bdb_add: %s\n", e->e_dn, 0, 0);
#endif
rc = entry_schema_check( be, e, NULL, &text, textbuf, textlen );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_ERR, "bdb_add: entry failed schema check: %s (%d)\n", text, rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_add: entry failed schema check: %s (%d)\n", text, rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_add: entry failed schema check: %s (%d)\n",
rc = bdb_next_id( be, NULL, &e->e_id );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_ERR, "bdb_add: next_id failed (%d)\n", rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_add: next_id failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_add: next_id failed (%d)\n",
text = NULL;
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_ERR, "bdb_add: txn_begin failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_add: txn_begin failed: %s (%d)\n", db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_add: txn_begin failed: %s (%d)\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_DETAIL1, "bdb_add: parent does not exist\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_add: parent does not exist\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: parent does not exist\n",
0, 0, 0 );
if ( ! rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_DETAIL1, "bdb_add: no write access to parent\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_add: no write access to parent\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: no write access to parent\n",
0, 0, 0 );
if ( is_entry_subentry( p ) ) {
/* parent is a subentry, don't allow add */
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_DETAIL1, "bdb_add: parent is subentry\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_add: parent is subentry\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is subentry\n",
0, 0, 0 );
if ( is_entry_alias( p ) ) {
/* parent is an alias, don't allow add */
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_DETAIL1, "bdb_add: parent is alias\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_add: parent is alias\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is alias\n",
0, 0, 0 );
BerVarray refs = get_entry_referrals( be, conn, op, p );
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_DETAIL1, "bdb_add: parent is referral\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_add: parent is referral\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: parent is referral\n",
0, 0, 0 );
if ( ! rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_DETAIL1, "bdb_add: no write access to parent\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_add: no write access to parent\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_add: no write access to parent\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_DETAIL1, "bdb_add: %s denied\n", pdn.bv_len == 0 ? "suffix" : "entry at root" ));
+ LDAP_LOG ( OPERATION, DETAIL1, "bdb_add: %s denied\n",
+ pdn.bv_len == 0 ? "suffix" : "entry at root", 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: %s denied\n",
pdn.bv_len == 0 ? "suffix" : "entry at root",
#ifdef BDB_SUBENTRIES
if( subentry ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_DETAIL1, "bdb_add: no parent, cannot add subentry\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_add: no parent, cannot add subentry\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_add: no parent, cannot add subentry\n",
rc = bdb_dn2id_add( be, ltid, &pdn, e );
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_ERR, "bdb_add: dn2id_add failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_add: dn2id_add failed: %s (%d)\n", db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: dn2id_add failed: %s (%d)\n",
db_strerror(rc), rc, 0 );
rc = bdb_id2entry_add( be, ltid, e );
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_ERR, "bdb_add: id2entry_add failed\n" ));
+ LDAP_LOG ( OPERATION, ERR, "bdb_add: id2entry_add failed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: id2entry_add failed\n",
0, 0, 0 );
rc = bdb_index_entry_add( be, ltid, e, e->e_attrs );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_ERR, "bdb_add: index_entry_add failed\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_add: index_entry_add failed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: index_entry_add failed\n",
0, 0, 0 );
if (rc == LDAP_SUCCESS) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_RESULTS, "bdb_add: added%s id=%08lx dn=\"%s\"\n", op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn ));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "bdb_add: added%s id=%08lx dn=\"%s\"\n",
+ op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn );
#else
Debug(LDAP_DEBUG_TRACE, "bdb_add: added%s id=%08lx dn=\"%s\"\n",
op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn );
}
else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "add", LDAP_LEVEL_ERR, "bdb_add: %s : %s (%d)\n", text, db_strerror(rc), rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_add: %s : %s (%d)\n", text, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: %s : %s (%d)\n",
text, db_strerror(rc), rc );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BACK_BDB, DETAIL1,
"attr_index_config: index %s 0x%04lx\n",
- ad->ad_cname.bv_val, mask ));
+ ad->ad_cname.bv_val, mask, 0 );
#else
Debug( LDAP_DEBUG_CONFIG, "index %s 0x%04lx\n",
ad->ad_cname.bv_val, mask, 0 );
DB_LOCK lock;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ARGS,
- "bdb_attribute: gr dn: \"%s\"\n", entry_ndn->bv_val ));
- LDAP_LOG(( "backend", LDAP_LEVEL_ARGS,
- "bdb_attribute: at: \"%s\"\n", entry_at_name));
- LDAP_LOG(( "backend", LDAP_LEVEL_ARGS,
- "bdb_attribute: tr dn: \"%s\"\n",
- target ? target->e_ndn : "" ));
+ LDAP_LOG( BACK_BDB, ARGS,
+ "bdb_attribute: gr dn: \"%s\"\n", entry_ndn->bv_val, 0, 0 );
+ LDAP_LOG( BACK_BDB, ARGS,
+ "bdb_attribute: at: \"%s\"\n", entry_at_name, 0, 0);
+ LDAP_LOG( BACK_BDB, ARGS, "bdb_attribute: tr dn: \"%s\"\n",
+ target ? target->e_ndn : "", 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"=> bdb_attribute: gr dn: \"%s\"\n",
/* we already have a LOCKED copy of the entry */
e = target;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "bdb_attribute: target is LOCKED (%s)\n",
- entry_ndn->bv_val ));
+ LDAP_LOG( BACK_BDB, DETAIL1,
+ "bdb_attribute: target is LOCKED (%s)\n", entry_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"=> bdb_attribute: target is entry: \"%s\"\n",
}
if (e == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "bdb_attribute: cannot find entry (%s)\n",
- entry_ndn->bv_val ));
+ LDAP_LOG( BACK_BDB, INFO,
+ "bdb_attribute: cannot find entry (%s)\n",
+ entry_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"=> bdb_attribute: cannot find entry: \"%s\"\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "bdb_attribute: found entry (%s)\n",
- entry_ndn->bv_val ));
+ LDAP_LOG( BACK_BDB, DETAIL1, "bdb_attribute: found entry (%s)\n",
+ entry_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"=> bdb_attribute: found entry: \"%s\"\n",
/* find attribute values */
if( is_entry_alias( e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "bdb_attribute: entry (%s) is an alias\n", e->e_dn ));
+ LDAP_LOG( BACK_BDB, INFO,
+ "bdb_attribute: entry (%s) is an alias\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= bdb_attribute: entry is an alias\n", 0, 0, 0 );
if( is_entry_referral( e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "bdb_attribute: entry (%s) is a referral.\n", e->e_dn ));
+ LDAP_LOG( BACK_BDB, INFO,
+ "bdb_attribute: entry (%s) is a referral.\n", e->e_dn, 0, 0);
#else
Debug( LDAP_DEBUG_ACL,
"<= bdb_attribute: entry is a referral\n", 0, 0, 0 );
if ((attr = attr_find(e->e_attrs, entry_at)) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "bdb_attribute: failed to find %s.\n", entry_at_name ));
+ LDAP_LOG( BACK_BDB, INFO,
+ "bdb_attribute: failed to find %s.\n", entry_at_name, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= bdb_attribute: failed to find %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "bdb_attribute: rc=%d nvals=%d.\n",
- rc, j ));
+ LDAP_LOG( BACK_BDB, ENTRY, "bdb_attribute: rc=%d nvals=%d.\n", rc, j, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_attribute: rc=%d nvals=%d\n",
DB_LOCK lock;
#ifdef NEW_LOGGING
- LDAP_LOG (( "bind", LDAP_LEVEL_ARGS, "==> bdb_bind: dn: %s\n", dn->bv_val ));
+ LDAP_LOG ( OPERATION, ARGS, "==> bdb_bind: dn: %s\n", dn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "==> bdb_bind: dn: %s\n", dn->bv_val, 0, 0);
#endif
if ( is_entry_subentry( e ) ) {
/* entry is an subentry, don't allow bind */
#ifdef NEW_LOGGING
- LDAP_LOG (( "bind", LDAP_LEVEL_DETAIL1, "bdb_bind: entry is subentry\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_bind: entry is subentry\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry is subentry\n", 0,
0, 0 );
if ( is_entry_alias( e ) ) {
/* entry is an alias, don't allow bind */
#ifdef NEW_LOGGING
- LDAP_LOG (( "bind", LDAP_LEVEL_DETAIL1, "bdb_bind: entry is alias\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1, "bdb_bind: entry is alias\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry is alias\n", 0,
0, 0 );
conn, op, e );
#ifdef NEW_LOGGING
- LDAP_LOG (( "bind", LDAP_LEVEL_DETAIL1, "bdb_bind: entry is referral\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_bind: entry is referral\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
0, 0 );
bdb_cache_entry_rdwr_lock(Entry *e, int rw)
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
- "bdb_cache_entry_rdwr_lock: %s lock on ID %ld\n",
- rw ? "w" : "r", e->e_id ));
+ LDAP_LOG( CACHE, ENTRY,
+ "bdb_cache_entry_rdwr_lock: %s lock on ID %ld\n",
+ rw ? "w" : "r", e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "entry_rdwr_%slock: ID: %ld\n",
rw ? "w" : "r", e->e_id, 0);
bdb_cache_entry_rdwr_trylock(Entry *e, int rw)
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
- "bdb_cache_entry_rdwr_trylock: try %s lock on ID: %ld.\n",
- rw ? "w" : "r", e->e_id ));
+ LDAP_LOG( CACHE, ENTRY,
+ "bdb_cache_entry_rdwr_trylock: try %s lock on ID: %ld.\n",
+ rw ? "w" : "r", e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "entry_rdwr_%strylock: ID: %ld\n",
rw ? "w" : "r", e->e_id, 0);
bdb_cache_entry_rdwr_unlock(Entry *e, int rw)
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
- "bdb_cache_entry_rdwr_unlock: remove %s lock on ID %ld.\n",
- rw ? "w" : "r", e->e_id ));
+ LDAP_LOG( CACHE, ENTRY,
+ "bdb_cache_entry_rdwr_unlock: remove %s lock on ID %ld.\n",
+ rw ? "w" : "r", e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "entry_rdwr_%sunlock: ID: %ld\n",
rw ? "w" : "r", e->e_id, 0);
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"bdb_unlocked_cache_return_entry_rw: return (%ld):%s, refcnt=%d\n",
- id, rw ? "w" : "r", refcnt ));
+ id, rw ? "w" : "r", refcnt );
#else
Debug( LDAP_DEBUG_TRACE,
"====> bdb_unlocked_cache_return_entry_%s( %ld ): created (%d)\n",
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"bdb_unlocked_cache_return_entry_rw: %ld, delete pending (%d).\n",
- id, refcnt ));
+ id, refcnt, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"====> bdb_unlocked_cache_return_entry_%s( %ld ): delete pending (%d)\n",
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"bdb_unlocked_cache_return_entry_rw: (%ld): deleted (%d)\n",
- id, refcnt ));
+ id, refcnt, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"====> bdb_unlocked_cache_return_entry_%s( %ld ): deleted (%d)\n",
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"bdb_unlocked_cache_return_entry_rw: ID %ld:%s returned (%d)\n",
- id, rw ? "w": "r", refcnt ));
+ id, rw ? "w": "r", refcnt );
#else
Debug( LDAP_DEBUG_TRACE,
"====> bdb_unlocked_cache_return_entry_%s( %ld ): returned (%d)\n",
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"bdb_cache_return_entry_rw: return (%ld):%s, refcnt=%d\n",
- id, rw ? "w" : "r", refcnt ));
+ id, rw ? "w" : "r", refcnt );
#else
Debug( LDAP_DEBUG_TRACE,
"====> bdb_cache_return_entry_%s( %ld ): created (%d)\n",
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"bdb_cache_return_entry_rw: %ld, delete pending (%d).\n",
- id, refcnt ));
+ id, refcnt, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"====> bdb_cache_return_entry_%s( %ld ): delete pending (%d)\n",
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"bdb_cache_return_entry_rw: (%ld): deleted (%d)\n",
- id, refcnt ));
+ id, refcnt, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"====> bdb_cache_return_entry_%s( %ld ): deleted (%d)\n",
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"bdb_cache_return_entry_rw: ID %ld:%s returned (%d)\n",
- id, rw ? "w": "r", refcnt ));
+ id, rw ? "w": "r", refcnt );
#else
Debug( LDAP_DEBUG_TRACE,
"====> bdb_cache_return_entry_%s( %ld ): returned (%d)\n",
Entry *ee;
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
- "bdb_cache_add_entry_rw: add (%s):%s to cache\n",
- e->e_dn, rw ? "w" : "r" ));
+ LDAP_LOG( CACHE, ENTRY,
+ "bdb_cache_add_entry_rw: add (%s):%s to cache\n",
+ e->e_dn, rw ? "w" : "r", 0 );
#endif
/* set cache write lock */
ldap_pvt_thread_rdwr_wlock( &cache->c_rwlock );
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ERR,
- "bdb_cache_add_entry_rw: add (%s):%ld private init failed!\n",
- e->e_dn, e->e_id ));
+ LDAP_LOG( CACHE, ERR,
+ "bdb_cache_add_entry_rw: add (%s):%ld private init failed!\n",
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"====> bdb_cache_add_entry( %ld ): \"%s\": private init failed!\n",
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "bdb_cache_add_entry: (%s):%ld already in cache.\n",
- e->e_dn, e->e_id ));
+ LDAP_LOG( CACHE, DETAIL1,
+ "bdb_cache_add_entry: (%s):%ld already in cache.\n",
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"====> bdb_cache_add_entry( %ld ): \"%s\": already in dn cache\n",
(AVL_CMP) entry_id_cmp, avl_dup_error ) != 0 )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "bdb_cache_add_entry: (%s):%ls already in cache.\n",
- e->e_dn, e->e_id ));
+ LDAP_LOG( CACHE, DETAIL1,
+ "bdb_cache_add_entry: (%s):%ls already in cache.\n",
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"====> bdb_cache_add_entry( %ld ): \"%s\": already in id cache\n",
(AVL_CMP) entry_dn_cmp ) == NULL )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "bdb_cache_add_entry: can't delete (%s) from cache.\n",
- e->e_dn ));
+ LDAP_LOG( CACHE, INFO,
+ "bdb_cache_add_entry: can't delete (%s) from cache.\n",
+ e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "====> can't delete from dn cache\n",
0, 0, 0 );
if ( avl_delete( &cache->c_idtree, (caddr_t) e,
(AVL_CMP) entry_id_cmp ) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "bdb_cache_add_entry: can't delete (%s) from cache.\n", e->e_dn ));
+ LDAP_LOG( CACHE, INFO,
+ "bdb_cache_add_entry: can't delete (%s) from cache.\n",
+ e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "====> can't delete from id cache\n", 0, 0, 0 );
#endif
if ( avl_delete( &cache->c_dntree, (caddr_t) e,
(AVL_CMP) entry_dn_cmp ) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "bdb_cache_add_entry: can't delete (%s) from cache.\n", e->e_dn ));
+ LDAP_LOG( CACHE, INFO,
+ "bdb_cache_add_entry: can't delete (%s) from cache.\n",
+ e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "====> can't delete from dn cache\n", 0, 0, 0 );
#endif
(AVL_CMP) entry_dn_cmp, avl_dup_error ) != 0 )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "bdb_cache_update_entry: (%s):%ld already in dn cache\n",
- e->e_dn, e->e_id ));
+ LDAP_LOG( CACHE, DETAIL1,
+ "bdb_cache_update_entry: (%s):%ld already in dn cache\n",
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"====> bdb_cache_update_entry( %ld ): \"%s\": already in dn cache\n",
(AVL_CMP) entry_id_cmp, avl_dup_error ) != 0 )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "bdb_cache_update_entry: (%s)%ld already in id cache\n",
- e->e_dn, e->e_id ));
+ LDAP_LOG( CACHE, DETAIL1,
+ "bdb_cache_update_entry: (%s)%ld already in id cache\n",
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"====> bdb_cache_update_entry( %ld ): \"%s\": already in id cache\n",
(AVL_CMP) entry_dn_cmp ) == NULL )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "bdb_cache_update_entry: can't delete (%s)%ld from dn cache.\n",
- e->e_dn, e->e_id ));
+ LDAP_LOG( CACHE, INFO,
+ "bdb_cache_update_entry: can't delete (%s)%ld from dn cache.\n",
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ANY, "====> can't delete from dn cache\n",
0, 0, 0 );
ldap_pvt_thread_rdwr_runlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "bdb_cache_find_entry_dn2id: (%s) %ld not ready: %d\n",
- ndn->bv_val, id, state ));
+ LDAP_LOG( CACHE, INFO,
+ "bdb_cache_find_entry_dn2id: (%s) %ld not ready: %d\n",
+ ndn->bv_val, id, state );
#else
Debug(LDAP_DEBUG_TRACE,
"====> bdb_cache_find_entry_dn2id(\"%s\"): %ld (not ready) %d\n",
ldap_pvt_thread_mutex_unlock( &cache->lru_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "bdb_cache_find_entry_dn2id: (%s): %ld %d tries\n",
- ndn->bv_val, id, count ));
+ LDAP_LOG( CACHE, DETAIL1,
+ "bdb_cache_find_entry_dn2id: (%s): %ld %d tries\n",
+ ndn->bv_val, id, count );
#else
Debug(LDAP_DEBUG_TRACE,
"====> bdb_cache_find_entry_dn2id(\"%s\"): %ld (%d tries)\n",
ldap_pvt_thread_rdwr_runlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "bdb_cache_find_entry_id: (%ld)->%ld not ready (%d).\n",
- id, ep_id, state ));
+ LDAP_LOG( CACHE, INFO,
+ "bdb_cache_find_entry_id: (%ld)->%ld not ready (%d).\n",
+ id, ep_id, state );
#else
Debug(LDAP_DEBUG_TRACE,
ldap_pvt_thread_rdwr_runlock( &cache->c_rwlock );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "bdb_cache_find_entry_id: %ld -> %ld (busy) %d.\n",
- id, ep_id, state ));
+ LDAP_LOG( CACHE, INFO,
+ "bdb_cache_find_entry_id: %ld -> %ld (busy) %d.\n",
+ id, ep_id, state );
#else
Debug(LDAP_DEBUG_TRACE,
"====> bdb_cache_find_entry_id( %ld ): %ld (busy) %d\n",
ldap_pvt_thread_mutex_unlock( &cache->lru_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "bdb_cache_find_entry_id: %ld -> %s found %d tries.\n",
- ep_id, ep->e_dn, count ));
+ LDAP_LOG( CACHE, DETAIL1,
+ "bdb_cache_find_entry_id: %ld -> %s found %d tries.\n",
+ ep_id, ep->e_dn, count );
#else
Debug(LDAP_DEBUG_TRACE,
"====> bdb_cache_find_entry_id( %ld ) \"%s\" (found) (%d tries)\n",
assert( e->e_private );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
- "bdb_cache_delete_entry: delete %ld.\n", e->e_id ));
+ LDAP_LOG( CACHE, ENTRY,
+ "bdb_cache_delete_entry: delete %ld.\n", e->e_id, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "====> bdb_cache_delete_entry( %ld )\n",
e->e_id, 0, 0 );
ldap_pvt_thread_mutex_lock( &cache->lru_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
- "bdb_cache_release_all: enter\n" ));
+ LDAP_LOG( CACHE, ENTRY, "bdb_cache_release_all: enter\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "====> bdb_cache_release_all\n", 0, 0, 0 );
#endif
if ( cache->c_cursize ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "bdb_cache_release_all: Entry cache could not be emptied.\n" ));
+ LDAP_LOG( CACHE, INFO,
+ "bdb_cache_release_all: Entry cache could not be emptied.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "Entry-cache could not be emptied\n", 0, 0, 0 );
#endif
conn, op, e );
#ifdef NEW_LOGGING
- LDAP_LOG (( "compare", LDAP_LEVEL_DETAIL1,"bdb_compare: entry is referral\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_compare: entry is referral\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
0, 0 );
rc = db_create( &db->bdi_db, bdb->bi_dbenv, 0 );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "dbcache", LDAP_LEVEL_ERR, "bdb_db_cache: db_create(%s) failed: %s (%d)\n", bdb->bi_dbenv_home, db_strerror(rc), rc ));
+ LDAP_LOG ( CACHE, ERR,
+ "bdb_db_cache: db_create(%s) failed: %s (%d)\n",
+ bdb->bi_dbenv_home, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_cache: db_create(%s) failed: %s (%d)\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "dbcache", LDAP_LEVEL_ERR, "bdb_db_cache: db_open(%s) failed: %s (%d)\n", name, db_strerror(rc), rc ));
+ LDAP_LOG ( CACHE, ERR,
+ "bdb_db_cache: db_open(%s) failed: %s (%d)\n",
+ name, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_cache: db_open(%s) failed: %s (%d)\n",
#endif
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_ARGS, "==> bdb_delete: %s\n",
- dn->bv_val ));
+ LDAP_LOG ( OPERATION, ARGS, "==> bdb_delete: %s\n", dn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "==> bdb_delete: %s\n",
dn->bv_val, 0, 0 );
bdb_unlocked_cache_return_entry_w(&bdb->bi_cache, e);
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_DETAIL1,
- "==> bdb_delete: retrying...\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==> bdb_delete: retrying...\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "==> bdb_delete: retrying...\n",
0, 0, 0 );
text = NULL;
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"==> bdb_delete: txn_begin failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_delete: txn_begin failed: %s (%d)\n",
if( p == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_DETAIL1,
- "<=- bdb_delete: parent does not exist\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "<=- bdb_delete: parent does not exist\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- bdb_delete: parent does not exist\n",
if ( !rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_DETAIL1,
- "<=- bdb_delete: no access to parent\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "<=- bdb_delete: no access to parent\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- bdb_delete: no access to parent\n",
if ( !rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_DETAIL1,
- "<=- bdb_delete: no access to parent\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "<=- bdb_delete: no access to parent\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- bdb_delete: no access "
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_DETAIL1,
- "<=- bdb_delete: no parent and not root\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "<=- bdb_delete: no parent and not root\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- bdb_delete: no parent "
BerVarray refs;
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_ARGS,
- "<=- bdb_delete: no such object %s\n",
- dn->bv_val ));
+ LDAP_LOG ( OPERATION, ARGS,
+ "<=- bdb_delete: no such object %s\n", dn->bv_val, 0, 0);
#else
Debug( LDAP_DEBUG_ARGS,
"<=- bdb_delete: no such object %s\n",
conn, op, e );
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_DETAIL1,
- "<=- bdb_delete: entry is referral\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "<=- bdb_delete: entry is referral\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_delete: entry is referral\n",
goto retry;
case 0:
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_DETAIL1,
- "<=- bdb_delete: non-leaf %s\n",
- dn->bv_val ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "<=- bdb_delete: non-leaf %s\n", dn->bv_val, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS,
"<=- bdb_delete: non-leaf %s\n",
break;
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"<=- bdb_delete: has_children failed %s (%d)\n",
- db_strerror(rc), rc ));
+ db_strerror(rc), rc, 0 );
#else
Debug(LDAP_DEBUG_ARGS,
"<=- bdb_delete: has_children failed: %s (%d)\n",
rc = LDAP_OTHER;
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_ERR,
- "<=- bdb_delete: dn2id failed %s (%d)\n",
- db_strerror(rc), rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "<=- bdb_delete: dn2id failed %s (%d)\n", db_strerror(rc), rc, 0 );
#else
Debug(LDAP_DEBUG_ARGS,
"<=- bdb_delete: dn2id failed: %s (%d)\n",
rc = LDAP_OTHER;
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_ERR,
- "<=- bdb_delete: id2entry failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "<=- bdb_delete: id2entry failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug(LDAP_DEBUG_ARGS,
"<=- bdb_delete: id2entry failed: %s (%d)\n",
rc = LDAP_OTHER;
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_ERR,
- "<=- bdb_delete: entry index delete failed!\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "<=- bdb_delete: entry index delete failed!\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "entry index delete failed!\n",
0, 0, 0 );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"bdb_delete: txn_%s failed: %s (%d)\n",
- op->o_noop ? "abort (no-op)" : "commit",
- db_strerror(rc), rc ));
+ op->o_noop ? "abort (no-op)" : "commit", db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_delete: txn_%s failed: %s (%d)\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "delete", LDAP_LEVEL_RESULTS,
+ LDAP_LOG ( OPERATION, RESULTS,
"bdb_delete: deleted%s id=%08lx db=\"%s\"\n",
- op->o_noop ? " (no-op)" : "",
- e->e_id, e->e_dn ));
+ op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_delete: deleted%s id=%08lx dn=\"%s\"\n",
#include "back-bdb.h"
+
/*
* dn2entry - look up dn in the cache/indexes and return the corresponding
* entry.
ID id, id2 = 0;
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2entry", LDAP_LEVEL_ARGS, "bdb_dn2entry_rw(\"%s\")\n",
- dn->bv_val ));
+ LDAP_LOG ( CACHE, ARGS, "bdb_dn2entry_rw(\"%s\")\n", dn->bv_val, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "bdb_dn2entry_rw(\"%s\")\n",
dn->bv_val, 0, 0 );
struct berval ptr, pdn;
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ARGS, "bdb_dn2id_add( \"%s\", 0x%08lx )\n",
- e->e_ndn, (long) e->e_id ));
+ LDAP_LOG ( INDEX, ARGS, "bdb_dn2id_add( \"%s\", 0x%08lx )\n",
+ e->e_ndn, (long) e->e_id, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_add( \"%s\", 0x%08lx )\n",
e->e_ndn, (long) e->e_id, 0 );
rc = db->put( db, txn, &key, &data, DB_NOOVERWRITE );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
- "bdb_dn2id_add: put failed: %s %d\n",
- db_strerror(rc), rc ));
+ LDAP_LOG ( INDEX, ERR, "bdb_dn2id_add: put failed: %s %d\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_dn2id_add: put failed: %s %d\n",
db_strerror(rc), rc, 0 );
rc = bdb_idl_insert_key( be, db, txn, &key, e->e_id );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
- "=> bdb_dn2id_add: subtree (%s) insert failed: %d\n",
- ptr.bv_val, rc ));
+ LDAP_LOG ( INDEX, ERR,
+ "=> bdb_dn2id_add: subtree (%s) insert failed: %d\n",
+ ptr.bv_val, rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_dn2id_add: subtree (%s) insert failed: %d\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
+ LDAP_LOG ( INDEX, ERR,
"=> bdb_dn2id_add: parent (%s) insert failed: %d\n",
- ptr.bv_val, rc ));
+ ptr.bv_val, rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_dn2id_add: parent (%s) insert failed: %d\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
+ LDAP_LOG ( INDEX, ERR,
"=> bdb_dn2id_add: subtree (%s) insert failed: %d\n",
- ptr.bv_val, rc ));
+ ptr.bv_val, rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_dn2id_add: subtree (%s) insert failed: %d\n",
done:
ch_free( buf );
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_RESULTS,
- "<= bdb_dn2id_add: %d\n", rc ));
+ LDAP_LOG ( INDEX, RESULTS, "<= bdb_dn2id_add: %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id_add: %d\n", rc, 0, 0 );
#endif
struct berval pdn, ptr;
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ARGS,
- "=> bdb_dn2id_delete ( \"%s\", 0x08lx )\n",
- e->e_ndn, e->e_id ));
+ LDAP_LOG ( INDEX, ARGS,
+ "=> bdb_dn2id_delete ( \"%s\", 0x%08lx )\n", e->e_ndn, e->e_id, 0);
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_delete( \"%s\", 0x%08lx )\n",
e->e_ndn, e->e_id, 0 );
rc = db->del( db, txn, &key, 0 );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
+ LDAP_LOG ( INDEX, ERR,
"=> bdb_dn2id_delete: delete failed: %s %d\n",
- db_strerror(rc), rc ));
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_dn2id_delete: delete failed: %s %d\n",
db_strerror(rc), rc, 0 );
rc = db->del( db, txn, &key, 0 );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
- "=> bdb_dn2id_delete: subtree (%s) delete failed: %d\n",
- ptr.bv_val, rc ));
+ LDAP_LOG ( INDEX, ERR,
+ "=> bdb_dn2id_delete: subtree (%s) delete failed: %d\n",
+ ptr.bv_val, rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_dn2id_delete: subtree (%s) delete failed: %d\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
+ LDAP_LOG ( INDEX, ERR,
"=> bdb_dn2id_delete: parent (%s) delete failed: %d\n",
- ptr.bv_val, rc ));
+ ptr.bv_val, rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_dn2id_delete: parent (%s) delete failed: %d\n",
rc = bdb_idl_delete_key( be, db, txn, &key, e->e_id );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
+ LDAP_LOG ( INDEX, ERR,
"=> bdb_dn2id_delete: subtree (%s) delete failed: %d\n",
- ptr.bv_val, rc ));
+ ptr.bv_val, rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_dn2id_delete: subtree (%s) delete failed: %d\n",
done:
ch_free( buf );
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_RESULTS, "<= bdb_dn2id_delete %d\n", rc ));
+ LDAP_LOG ( INDEX, RESULTS, "<= bdb_dn2id_delete %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id_delete %d\n", rc, 0, 0 );
#endif
DB *db = bdb->bi_dn2id->bdi_db;
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ARGS, "=> bdb_dn2id( \"%s\" )\n",
- dn->bv_val ));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_dn2id( \"%s\" )\n", dn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id( \"%s\" )\n", dn->bv_val, 0, 0 );
#endif
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
- "<= bdb_dn2id: get failed %s (%d)\n",
- db_strerror(rc), rc ));
+ LDAP_LOG ( INDEX, ERR, "<= bdb_dn2id: get failed %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id: get failed: %s (%d)\n",
db_strerror( rc ), rc, 0 );
#endif
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_RESULTS,
- "<= bdb_dn2id: got id=0x%08lx\n", *id ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_dn2id: got id=0x%08lx\n", *id, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id: got id=0x%08lx\n",
*id, 0, 0 );
ID cached_id;
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ARGS,
- "=> bdb_dn2id_matched( \"%s\" )\n", in->bv_val ));
+ LDAP_LOG ( INDEX, ARGS,
+ "=> bdb_dn2id_matched( \"%s\" )\n", in->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_matched( \"%s\" )\n", in->bv_val, 0, 0 );
#endif
dnParent( &dn, &pdn );
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_DETAIL1,
- "<= bdb_dn2id_matched: no match\n" ));
+ LDAP_LOG ( INDEX, DETAIL1,
+ "<= bdb_dn2id_matched: no match\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_dn2id_matched: no match\n",
} else if ( rc == 0 ) {
if( data.size != sizeof( ID ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( INDEX, DETAIL1,
"<= bdb_dn2id_matched: get size mismatch:"
"expected %ld, got %ld\n",
- (long) sizeof(ID), (long) data.size ));
+ (long) sizeof(ID), (long) data.size, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= bdb_dn2id_matched: get size mismatch: "
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( INDEX, DETAIL1,
"<= bdb_dn2id_matched: id=0x%08lx: %s %s\n",
- (long) *id, *id2 == 0 ? "entry" : "matched", dn.bv_val ));
+ (long) *id, *id2 == 0 ? "entry" : "matched", dn.bv_val );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_dn2id_matched: id=0x%08lx: %s %s\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
+ LDAP_LOG ( INDEX, ERR,
"<= bdb_dn2id_matched: get failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= bdb_dn2id_matched: get failed: %s (%d)\n",
ID id;
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ARGS,
- "=> bdb_dn2id_children( %s )\n", dn->bv_val ));
+ LDAP_LOG ( INDEX, ARGS,
+ "=> bdb_dn2id_children( %s )\n", dn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2id_children( %s )\n",
dn->bv_val, 0, 0 );
free( key.data );
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( INDEX, DETAIL1,
"<= bdb_dn2id_children( %s ): %schildren (%d)\n",
dn->bv_val, rc == 0 ? "" : ( rc == DB_NOTFOUND ? "no " :
- db_strerror(rc)), rc ));
+ db_strerror(rc)), rc );
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id_children( %s ): %schildren (%d)\n",
dn->bv_val,
DB *db = bdb->bi_dn2id->bdi_db;
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ARGS,
- "=> bdb_dn2ididl( \"%s\" )\n", dn->bv_val ));
+ LDAP_LOG ( INDEX, ARGS,
+ "=> bdb_dn2ididl( \"%s\" )\n", dn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_dn2idl( \"%s\" )\n", dn->bv_val, 0, 0 );
#endif
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_ERR,
- "<= bdb_dn2ididl: get failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ LDAP_LOG ( INDEX, ERR,
+ "<= bdb_dn2ididl: get failed: %s (%d)\n", db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_dn2idl: get failed: %s (%d)\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "db2id", LDAP_LEVEL_RESULTS,
+ LDAP_LOG ( INDEX, RESULTS,
"<= bdb_dn2ididl: id=%ld first=%ld last=%ld\n",
(long) ids[0], (long) BDB_IDL_FIRST( ids ),
- (long) BDB_IDL_LAST( ids ) ));
+ (long) BDB_IDL_LAST( ids ) );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_dn2idl: id=%ld first=%ld last=%ld\n",
void bdb_errcall( const char *pfx, char * msg )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "error", LDAP_LEVEL_INFO, "bdb(%s): %s\n", pfx, msg ));
+ LDAP_LOG ( OPERATION, INFO, "bdb(%s): %s\n", pfx, msg, 0 );
#else
Debug( LDAP_DEBUG_ANY, "bdb(%s): %s\n", pfx, msg, 0 );
#endif
{
int rc = -1;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ENTRY, "=> bdb_filter_candidates\n"));
+ LDAP_LOG ( INDEX, ENTRY, "=> bdb_filter_candidates\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "=> bdb_filter_candidates\n", 0, 0, 0 );
#endif
switch ( f->f_choice ) {
case SLAPD_FILTER_DN_ONE:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tDN ONE\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tDN ONE\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tDN ONE\n", 0, 0, 0 );
#endif
case SLAPD_FILTER_DN_SUBTREE:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tDN SUBTREE\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tDN SUBTREE\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tDN SUBTREE\n", 0, 0, 0 );
#endif
case LDAP_FILTER_PRESENT:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tPRESENT\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tPRESENT\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tPRESENT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_EQUALITY:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tEQUALITY\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tEQUALITY\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tEQUALITY\n", 0, 0, 0 );
#endif
case LDAP_FILTER_APPROX:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tAPPROX\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tAPPROX\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tAPPROX\n", 0, 0, 0 );
#endif
case LDAP_FILTER_SUBSTRINGS:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tSUBSTRINGS\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tSUBSTRINGS\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tSUBSTRINGS\n", 0, 0, 0 );
#endif
case LDAP_FILTER_GE:
/* no GE index, use pres */
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tGE\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tGE\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tGE\n", 0, 0, 0 );
#endif
case LDAP_FILTER_LE:
/* no LE index, use pres */
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tLE\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tLE\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tLE\n", 0, 0, 0 );
#endif
case LDAP_FILTER_NOT:
/* no indexing to support NOT filters */
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tNOT\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tNOT\n",0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tNOT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_AND:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tAND\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tAND\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tAND\n", 0, 0, 0 );
#endif
case LDAP_FILTER_OR:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tOR\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tOR\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tOR\n", 0, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_filter_candidates: \tUNKNOWN\n"));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_filter_candidates: \tUNKNOWN\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tUNKNOWN %lu\n",
(unsigned long) f->f_choice, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "=> bdb_filter_candidates: id=%ld first=%ld last=%ld\n", (long) ids[0], (long) BDB_IDL_FIRST( ids ), (long) BDB_IDL_LAST( ids ) ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "=> bdb_filter_candidates: id=%ld first=%ld last=%ld\n",
+ (long)ids[0], (long)BDB_IDL_FIRST( ids ), (long) BDB_IDL_LAST( ids ));
#else
Debug( LDAP_DEBUG_FILTER,
"<= bdb_filter_candidates: id=%ld first=%ld last=%ld\n",
Filter *f;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "=> bdb_list_candidates: 0x%x\n", ftype));
+ LDAP_LOG ( INDEX, ARGS, "=> bdb_list_candidates: 0x%x\n", ftype, 0 , 0 );
#else
Debug( LDAP_DEBUG_FILTER, "=> bdb_list_candidates 0x%x\n", ftype, 0, 0 );
#endif
if( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_list_candidates: id=%ld first=%ld last=%ld\n", (long) ids[0], (long) BDB_IDL_FIRST( ids ), (long) BDB_IDL_LAST( ids ) ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_list_candidates: id=%ld first=%ld last=%ld\n",
+ (long) ids[0], (long) BDB_IDL_FIRST( ids ),
+ (long) BDB_IDL_LAST( ids ) );
#else
Debug( LDAP_DEBUG_FILTER,
"<= bdb_list_candidates: id=%ld first=%ld last=%ld\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "<= bdb_list_candidates: rc=%d\n", rc));
+ LDAP_LOG ( INDEX, ARGS, "<= bdb_list_candidates: rc=%d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER,
"<= bdb_list_candidates: undefined rc=%d\n",
struct berval prefix = {0};
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ENTRY, "=> bdb_presence_candidates\n"));
+ LDAP_LOG ( INDEX, ENTRY, "=> bdb_presence_candidates\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_presence_candidates\n", 0, 0, 0 );
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "=> bdb_presence_candidates: index_parm returned=%d\n", rc ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "=> bdb_presence_candidates: index_parm returned=%d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_presence_candidates: index_param returned=%d\n",
if( db == NULL ) {
/* not indexed */
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_presence_candidates: not indexed\n" ));
+ LDAP_LOG(INDEX, RESULTS,
+ "<= bdb_presence_candidates: not indexed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_presence_candidates: not indexed\n",
if( prefix.bv_val == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_presence_candidates: no prefix\n" ));
+ LDAP_LOG(INDEX, RESULTS,
+ "<= bdb_presence_candidates: no prefix\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_presence_candidates: no prefix\n",
rc = 0;
} else if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_presence_candidates: key read failed (%d)\n", rc ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_presence_candidates: key read failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_presense_candidates: key read failed (%d)\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_presence_candidates: id=%ld first=%ld last=%ld\n", (long) ids[0], (long) BDB_IDL_FIRST( ids ), (long) BDB_IDL_LAST( ids ) ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_presence_candidates: id=%ld first=%ld last=%ld\n",
+ (long)ids[0], (long)BDB_IDL_FIRST( ids ), (long)BDB_IDL_LAST( ids ) );
#else
Debug(LDAP_DEBUG_TRACE,
"<= bdb_presence_candidates: id=%ld first=%ld last=%ld\n",
MatchingRule *mr;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ENTRY, "=> equality_candidates\n"));
+ LDAP_LOG ( INDEX, ENTRY, "=> equality_candidates\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_equality_candidates\n", 0, 0, 0 );
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "=> bdb_equality_candidates: index_param failed (%d)\n", rc));
+ LDAP_LOG ( INDEX, RESULTS,
+ "=> bdb_equality_candidates: index_param failed (%d)\n", rc, 0, 0);
#else
Debug( LDAP_DEBUG_ANY,
"<= bdb_equality_candidates: index_param failed (%d)\n",
if ( db == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "=> bdb_equality_candidates: not indexed\n"));
+ LDAP_LOG(INDEX, RESULTS,
+ "=> bdb_equality_candidates: not indexed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= bdb_equality_candidates: not indexed\n", 0, 0, 0 );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "=> bdb_equality_candidates: MR filter failed (%d)\n", rc));
+ LDAP_LOG ( INDEX, RESULTS,
+ "=> bdb_equality_candidates: MR filter failed (%d)\n", rc, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_equality_candidates: MR filter failed (%d)\n",
if( keys == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "=> bdb_equality_candidates: no keys\n"));
+ LDAP_LOG ( INDEX, RESULTS,
+ "=> bdb_equality_candidates: no keys\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_equality_candidates: no keys\n",
rc = 0;
} else if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_equality_candidates: key read failed (%d)\n", rc));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_equality_candidates: key read failed (%d)\n", rc, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_equality_candidates key read failed (%d)\n",
if( BDB_IDL_IS_ZERO( tmp ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "=> bdb_equality_candidates: NULL\n"));
+ LDAP_LOG ( INDEX, RESULTS, "=> bdb_equality_candidates: NULL\n", 0, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_equality_candidates NULL\n",
ber_bvarray_free( keys );
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_equality_candidates: id=%ld first=%ld last=%ld\n", (long) ids[0], (long) BDB_IDL_FIRST( ids ), (long) BDB_IDL_LAST( ids ) ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_equality_candidates: id=%ld first=%ld last=%ld\n",
+ (long) ids[0], (long) BDB_IDL_FIRST( ids ),
+ (long) BDB_IDL_LAST( ids ) );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_equality_candidates id=%ld, first=%ld, last=%ld\n",
MatchingRule *mr;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ENTRY, "=> bdb_approx_candidates\n"));
+ LDAP_LOG ( INDEX, ENTRY, "=> bdb_approx_candidates\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_approx_candidates\n", 0, 0, 0 );
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_approx_candidates: index_param failed (%d)\n", rc ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_approx_candidates: index_param failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= bdb_approx_candidates: index_param failed (%d)\n",
if ( db == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_approx_candidates: not indexed\n" ));
+ LDAP_LOG(INDEX, RESULTS,
+ "<= bdb_approx_candidates: not indexed\n",0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= bdb_approx_candidates: not indexed\n", 0, 0, 0 );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_approx_candidates: MR filter failed (%d)\n", rc ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_approx_candidates: MR filter failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_approx_candidates: (%s) MR filter failed (%d)\n",
if( keys == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_approx_candidates: no keys (%s)\n", prefix.bv_val ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_approx_candidates: no keys (%s)\n", prefix.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_approx_candidates: no keys (%s)\n",
break;
} else if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_approx_candidates: key read failed (%d)\n", rc ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_approx_candidates: key read failed (%d)\n", rc, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_approx_candidates key read failed (%d)\n",
rc, 0, 0 );
if( BDB_IDL_IS_ZERO( tmp ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_approx_candidates: NULL\n" ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_approx_candidates: NULL\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_approx_candidates NULL\n",
0, 0, 0 );
ber_bvarray_free( keys );
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_approx_candidates: id=%ld first=%ld last=%ld\n", (long) ids[0], (long) BDB_IDL_FIRST( ids ), (long) BDB_IDL_LAST( ids ) ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_approx_candidates: id=%ld first=%ld last=%ld\n",
+ (long) ids[0], (long) BDB_IDL_FIRST( ids ),
+ (long) BDB_IDL_LAST( ids ) );
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_approx_candidates %ld, first=%ld, last=%ld\n",
(long) ids[0],
MatchingRule *mr;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_ENTRY, "=> bdb_substring_candidates\n"));
+ LDAP_LOG ( INDEX, ENTRY, "=> bdb_substring_candidates\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_substring_candidates\n", 0, 0, 0 );
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_substring_candidates: index_param failed (%d)\n", rc ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_substring_candidates: index_param failed (%d)\n", rc, 0, 0);
#else
Debug( LDAP_DEBUG_ANY,
"<= bdb_substring_candidates: index_param failed (%d)\n",
if ( db == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_substring_candidates: not indexed\n"));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_substring_candidates: not indexed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= bdb_substring_candidates not indexed\n",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_substring_candidates: (%s) MR filter failed (%d)\n", sub->sa_desc->ad_cname.bv_val, rc ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_substring_candidates: (%s) MR filter failed (%d)\n",
+ sub->sa_desc->ad_cname.bv_val, rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_substring_candidates: (%s) MR filter failed (%d)\n",
if( keys == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_substring_candidates: (%s) MR filter failed (%d)\n", mask, sub->sa_desc->ad_cname.bv_val ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_substring_candidates: (%d) MR filter failed (%s)\n",
+ mask, sub->sa_desc->ad_cname.bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= bdb_substring_candidates: (0x%04lx) no keys (%s)\n",
break;
} else if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_substring_candidates: key read failed (%d)\n", rc));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_substring_candidates: key read failed (%d)\n", rc, 0,0);
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_substring_candidates key read failed (%d)\n",
rc, 0, 0 );
if( BDB_IDL_IS_ZERO( tmp ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_substring_candidates: NULL \n" ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_substring_candidates: NULL \n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_substring_candidates NULL\n",
0, 0, 0 );
ber_bvarray_free( keys );
#ifdef NEW_LOGGING
- LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_substring_candidates: id=%ld first=%ld last=%ld\n", (long) ids[0], (long) BDB_IDL_FIRST( ids ), (long) BDB_IDL_LAST( ids ) ));
+ LDAP_LOG ( INDEX, RESULTS,
+ "<= bdb_substring_candidates: id=%ld first=%ld last=%ld\n",
+ (long) ids[0], (long) BDB_IDL_FIRST( ids ),
+ (long) BDB_IDL_LAST( ids ) );
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_substring_candidates %ld, first=%ld, last=%ld\n",
(long) ids[0],
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( BACK_BDB, ENTRY,
"bdb_group: check (%s) member of (%s), oc %s\n",
- op_ndn->bv_val, gr_ndn->bv_val, group_oc_name ));
+ op_ndn->bv_val, gr_ndn->bv_val, group_oc_name );
#else
Debug( LDAP_DEBUG_ARGS,
"=> bdb_group: gr dn: \"%s\"\n",
/* we already have a LOCKED copy of the entry */
e = target;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "bdb_group: target is group (%s)\n", gr_ndn->bv_val ));
+ LDAP_LOG( BACK_BDB, DETAIL1,
+ "bdb_group: target is group (%s)\n", gr_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"=> bdb_group: target is group: \"%s\"\n",
}
if (e == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "bdb_group: cannot find group (%s)\n",
- gr_ndn->bv_val ));
+ LDAP_LOG( BACK_BDB, DETAIL1,
+ "bdb_group: cannot find group (%s)\n", gr_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"=> bdb_group: cannot find group: \"%s\"\n",
return( 1 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "bdb_group: found group (%s)\n", gr_ndn->bv_val ));
+ LDAP_LOG( BACK_BDB, DETAIL1,
+ "bdb_group: found group (%s)\n", gr_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"=> bdb_group: found group: \"%s\"\n",
#ifdef BDB_ALIASES
if( is_entry_alias( e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "bdb_group: group (%s) is an alias\n", gr_ndn->bv_val ));
+ LDAP_LOG( BACK_BDB, INFO,
+ "bdb_group: group (%s) is an alias\n", gr_ndn->bv_val, 0, 0);
#else
Debug( LDAP_DEBUG_ACL,
"<= bdb_group: group is an alias\n", 0, 0, 0 );
if( is_entry_referral( e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "bdb_group: group (%s) is a referral.\n", gr_ndn->bv_val ));
+ LDAP_LOG( BACK_BDB, INFO,
+ "bdb_group: group (%s) is a referral.\n", gr_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= bdb_group: group is a referral\n", 0, 0, 0 );
if( !is_entry_objectclass( e, group_oc, 0 ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "bdb_group: failed to find %s in objectClass.\n",
- group_oc_name ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_group: failed to find %s in objectClass.\n",
+ group_oc_name, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= bdb_group: failed to find %s in objectClass\n",
if ((attr = attr_find(e->e_attrs, group_at)) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "bdb_group: failed to find %s\n", group_at_name ));
+ LDAP_LOG( BACK_BDB, INFO,
+ "bdb_group: failed to find %s\n", group_at_name, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= bdb_group: failed to find %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( BACK_BDB, ENTRY,
"bdb_group: found objectClass %s and %s\n",
- group_oc_name, group_at_name ));
+ group_oc_name, group_at_name, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= bdb_group: found objectClass %s and %s\n",
if( value_find( group_at, attr->a_vals, op_ndn ) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BACK_BDB, DETAIL1,
"bdb_group: \"%s\" not in \"%s\": %s\n",
- op_ndn->bv_val, gr_ndn->bv_val, group_at_name ));
+ op_ndn->bv_val, gr_ndn->bv_val, group_at_name );
#else
Debug( LDAP_DEBUG_ACL,
"<= bdb_group: \"%s\" not in \"%s\": %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "bdb_group: %s is in %s: %s\n",
- op_ndn->bv_val, gr_ndn->bv_val, group_at_name ));
+ LDAP_LOG( BACK_BDB, DETAIL1, "bdb_group: %s is in %s: %s\n",
+ op_ndn->bv_val, gr_ndn->bv_val, group_at_name );
#else
Debug( LDAP_DEBUG_ACL,
"<= bdb_group: \"%s\" is in \"%s\": %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "bdb_group: rc=%d\n", rc ));
+ LDAP_LOG( BACK_BDB, ENTRY, "bdb_group: rc=%d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_group: rc=%d\n", rc, 0, 0 );
#endif
{
if( BDB_IDL_IS_RANGE( ids ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_INFO, "IDL: range (%ld - %ld)\n",
+ LDAP_LOG( INDEX, INFO, "IDL: range (%ld - %ld)\n",
(long) BDB_IDL_RANGE_FIRST( ids ),
- (long) BDB_IDL_RANGE_LAST( ids ) ));
+ (long) BDB_IDL_RANGE_LAST( ids ), 0 );
#else
Debug( LDAP_DEBUG_ANY,
"IDL: range ( %ld - %ld )\n",
} else {
ID i;
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_INFO, "IDL: size %ld",
- (long) ids[0] ));
+ LDAP_LOG( INDEX, INFO, "IDL: size %ld", (long) ids[0], 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "IDL: size %ld", (long) ids[0], 0, 0 );
#endif
Debug( LDAP_DEBUG_ANY, "\n", 0, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_INFO, "%02lx",(long)ids[i] ));
+ LDAP_LOG( INDEX, INFO, "%02lx",(long)ids[i], 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " %02lx", (long) ids[i], 0, 0 );
#endif
#if IDL_DEBUG > 1
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_DETAIL1, "insert: %04lx at %d\n",
- (long) id, x ));
+ LDAP_LOG( INDEX, DETAIL1, "insert: %04lx at %d\n", (long) id, x, 0 );
#else
Debug( LDAP_DEBUG_ANY, "insert: %04lx at %d\n", (long) id, x, 0 );
idl_dump( ids );
#if IDL_DEBUG > 1
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_DETAIL1, "delete: %04lx at %d\n",
- (long) id, x ));
+ LDAP_LOG( INDEX, DETAIL1, "delete: %04lx at %d\n", (long) id, x, 0 );
#else
Debug( LDAP_DEBUG_ANY, "delete: %04lx at %d\n", (long) id, x, 0 );
idl_dump( ids );
rc = db->cursor( db, tid, &cursor, bdb->bi_db_opflags );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_fetch_key: cursor failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_fetch_key: cursor failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_fetch_key: "
"cursor failed: %s (%d)\n", db_strerror(rc), rc, 0 );
if (ids[1] == 0) {
if (ids[0] != BDB_IDL_RANGE_SIZE) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "=> bdb_idl_fetch_key: range size mismatch: expected %ld, got %ld\n", BDB_IDL_RANGE_SIZE, ids[0] ));
+ LDAP_LOG( INDEX, ERR,
+ "=> bdb_idl_fetch_key: range size mismatch: "
+ "expected %ld, got %ld\n",
+ BDB_IDL_RANGE_SIZE, ids[0], 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_fetch_key: "
"range size mismatch: expected %d, got %ld\n",
rc2 = cursor->c_close( cursor );
if (rc2) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_fetch_key: close failed: %s (%d)\n", db_strerror(rc2), rc2 ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_fetch_key: close failed: %s (%d)\n",
+ db_strerror(rc2), rc2, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_fetch_key: "
"close failed: %s (%d)\n", db_strerror(rc2), rc2, 0 );
} else if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_fetch_key: get failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_fetch_key: get failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_fetch_key: "
"get failed: %s (%d)\n",
} else if ( data.size == 0 || data.size % sizeof( ID ) ) {
/* size not multiple of ID size */
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_fetch_key: odd size: expected %ld multiple, got %ld\n", (long) sizeof( ID ), (long) data.size ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_fetch_key: odd size: expected %ld multiple, got %ld\n",
+ (long) sizeof( ID ), (long) data.size, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_fetch_key: "
"odd size: expected %ld multiple, got %ld\n",
} else if ( data.size != BDB_IDL_SIZEOF(ids) ) {
/* size mismatch */
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_fetch_key: get size mismatch: expected %ld, got %ld\n", (long) ((1 + ids[0]) * sizeof( ID )), (long) data.size ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_fetch_key: get size mismatch: expected %ld, got %ld\n",
+ (long) ((1 + ids[0]) * sizeof( ID )), (long) data.size, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_fetch_key: "
"get size mismatch: expected %ld, got %ld\n",
#if 0
/* for printable keys only */
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ARGS, "bdb_idl_insert_key: %s %ld\n", (char *)key->data, (long) id ));
+ LDAP_LOG( INDEX, ARGS, "bdb_idl_insert_key: %s %ld\n",
+ (char *)key->data, (long) id, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"=> bdb_idl_insert_key: %s %ld\n",
rc = db->cursor( db, tid, &cursor, bdb->bi_db_opflags );
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_insert_key: cursor failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_insert_key: cursor failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_insert_key: "
"cursor failed: %s (%d)\n", db_strerror(rc), rc, 0 );
/* initial c_get failed, nothing was done */
fail:
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_insert_key: %s failed: %s (%d)\n", err, db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_insert_key: %s failed: %s (%d)\n",
+ err, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_insert_key: "
"%s failed: %s (%d)\n", err, db_strerror(rc), rc );
} else if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_insert_key: get failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR, "bdb_idl_insert_key: get failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_insert_key: "
"get failed: %s (%d)\n",
} else if ( data.size == 0 || data.size % sizeof( ID ) ) {
/* size not multiple of ID size */
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_insert_key: odd size: expected %ld multiple, got %ld\n", (long) sizeof( ID ), (long) data.size ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_insert_key: odd size: expected %ld multiple, got %ld\n",
+ (long) sizeof( ID ), (long) data.size, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_insert_key: "
"odd size: expected %ld multiple, got %ld\n",
} else if ( data.size != BDB_IDL_SIZEOF(ids) ) {
/* size mismatch */
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_insert_key: odd size: expected %ld multiple, got %ld\n", (long) ((1 + ids[0]) * sizeof( ID )), (long) data.size ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_insert_key: odd size: expected %ld multiple, got %ld\n",
+ (long) ((1 + ids[0]) * sizeof( ID )), (long) data.size, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_insert_key: "
"get size mismatch: expected %ld, got %ld\n",
if( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_DETAIL1, "bdb_idl_insert_key: dup\n" ));
+ LDAP_LOG( INDEX, DETAIL1, "bdb_idl_insert_key: dup\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_idl_insert_key: dup\n",
0, 0, 0 );
}
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_insert_key: insert failed: (%d)\n", rc ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_insert_key: insert failed: (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_insert_key: "
"bdb_idl_insert failed (%d)\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_insert_key: put failed: (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_insert_key: put failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_insert_key: "
"put failed: %s (%d)\n",
#if 0
/* for printable keys only */
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ARGS, "bdb_idl_delete_key: %s %ld\n", (char *)key->data, (long) id ));
+ LDAP_LOG( INDEX, ARGS, "bdb_idl_delete_key: %s %ld\n",
+ (char *)key->data, (long) id, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"=> bdb_idl_delete_key: %s %ld\n",
rc = db->cursor( db, tid, &cursor, bdb->bi_db_opflags );
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_delete_key: cursor failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_delete_key: cursor failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_delete_key: "
"cursor failed: %s (%d)\n", db_strerror(rc), rc, 0 );
/* initial c_get failed, nothing was done */
fail:
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_delete_key: %s failed: %s (%d)\n", err, db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_delete_key: %s failed: %s (%d)\n",
+ err, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_delete_key: "
"%s failed: %s (%d)\n", err, db_strerror(rc), rc );
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_delete_key: get failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR, "bdb_idl_delete_key: get failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_delete_key: "
"get failed: %s (%d)\n",
} else if ( data.size == 0 || data.size % sizeof( ID ) ) {
/* size not multiple of ID size */
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_delete_key: odd size: expected: %ld multiple, got %ld\n", (long) sizeof( ID ), (long) data.size ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_delete_key: odd size: expected: %ld multiple, got %ld\n",
+ (long) sizeof( ID ), (long) data.size, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_delete_key: "
"odd size: expected %ld multiple, got %ld\n",
} else if ( data.size != (1 + ids[0]) * sizeof( ID ) ) {
/* size mismatch */
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_delete_key: get size mismatch: expected: %ld, got %ld\n", (long) ((1 + ids[0]) * sizeof( ID )), (long) data.size ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_delete_key: get size mismatch: expected: %ld, got %ld\n",
+ (long) ((1 + ids[0]) * sizeof( ID )), (long) data.size, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_delete_key: "
"get size mismatch: expected %ld, got %ld\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_delete_key: delete failed: (%d)\n", rc ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_delete_key: delete failed: (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_delete_key: "
"idl_delete failed (%d)\n",
rc = db->del( db, tid, key, 0 );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_delete_key: delete failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_idl_delete_key: delete failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_delete_key: "
"delete failed: %s (%d)\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR, "bdb_idl_delete_key: put failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( INDEX, ERR, "bdb_idl_delete_key: put failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_idl_delete_key: put failed: %s (%d)\n",
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ERR,
- "bdb_index_read: Could not open DB %s\n", dbname));
+ LDAP_LOG( INDEX, ERR,
+ "bdb_index_read: Could not open DB %s\n", dbname, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= bdb_index_read NULL (could not open %s)\n",
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "index_entry: %s (%s) %ld\n",
- op == SLAP_INDEX_ADD_OP ? "add" : "del",
- e->e_dn, (long) e->e_id ));
+ LDAP_LOG( INDEX, ENTRY, "index_entry: %s (%s) %ld\n",
+ op == SLAP_INDEX_ADD_OP ? "add" : "del", e->e_dn, (long) e->e_id );
#else
Debug( LDAP_DEBUG_TRACE, "=> index_entry_%s( %ld, \"%s\" )\n",
op == SLAP_INDEX_ADD_OP ? "add" : "del",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "index_entry: failure (%d)\n", rc ));
+ LDAP_LOG( INDEX, ENTRY,
+ "index_entry: failure (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= index_entry_%s( %ld, \"%s\" ) failure\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "index_entry: success\n" ));
+ LDAP_LOG( INDEX, ENTRY, "index_entry: success\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= index_entry_%s( %ld, \"%s\" ) success\n",
op == SLAP_INDEX_ADD_OP ? "add" : "del",
struct bdb_info *bdb;
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ENTRY, "bdb_db_init" ));
+ LDAP_LOG( BACK_BDB, ENTRY, "bdb_db_init", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_init: Initializing BDB database\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_init: aborted %d locks\n", aborted ));
+ LDAP_LOG( BACK_BDB, ERR, "bdb_db_init: aborted %d locks\n",
+ aborted, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_lock_detect: aborted %d locks\n",
u_int32_t flags;
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ARGS, "bdb_db_open: %s\n", be->be_suffix[0].bv_val ));
+ LDAP_LOG( BACK_BDB, ARGS,
+ "bdb_db_open: %s\n", be->be_suffix[0].bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"bdb_db_open: %s\n",
rc = db_env_create( &bdb->bi_dbenv, 0 );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_open: db_env_create failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_open: db_env_create failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_open: db_env_create failed: %s (%d)\n",
rc = bdb->bi_dbenv->set_tmp_dir( bdb->bi_dbenv, dir );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_open: set_tmp_dir(%s) failed: %s (%d)\n", dir, db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_open: set_tmp_dir(%s) failed: %s (%d)\n",
+ dir, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_open: set_tmp_dir(%s) failed: %s (%d)\n",
rc = bdb->bi_dbenv->set_lg_dir( bdb->bi_dbenv, dir );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_open: set_lg_dir(%s) failed: %s (%d)\n", dir, db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_open: set_lg_dir(%s) failed: %s (%d)\n",
+ dir, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_open: set_lg_dir(%s) failed: %s (%d)\n",
rc = bdb->bi_dbenv->set_data_dir( bdb->bi_dbenv, dir );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_open: set_data_dir(%s) failed: %s (%d)\n", dir, db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_open: set_data_dir(%s) failed: %s (%d)\n",
+ dir, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_open: set_data_dir(%s) failed: %s (%d)\n",
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_DETAIL1, "bdb_db_open: dbenv_open %s\n", bdb->bi_dbenv_home ));
+ LDAP_LOG( BACK_BDB, DETAIL1,
+ "bdb_db_open: dbenv_open %s\n", bdb->bi_dbenv_home, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_db_open: dbenv_open(%s)\n",
bdb->bi_dbenv_mode );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_open: dbenv_open failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_open: dbenv_open failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_open: dbenv_open failed: %s (%d)\n",
bdb->bi_dbenv_xflags, 1);
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_open: dbenv_set_flags failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_open: dbenv_set_flags failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_open: dbenv_set_flags failed: %s (%d)\n",
rc = db_create( &db->bdi_db, bdb->bi_dbenv, 0 );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_open: db_create(%s) failed: %s (%d)\n", bdb->bi_dbenv_home, db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_open: db_create(%s) failed: %s (%d)\n",
+ bdb->bi_dbenv_home, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_open: db_create(%s) failed: %s (%d)\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_open: db_create(%s) failed: %s (%d)\n", bdb->bi_dbenv_home, db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_open: db_create(%s) failed: %s (%d)\n",
+ bdb->bi_dbenv_home, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_open: db_open(%s) failed: %s (%d)\n",
rc = bdb_last_id( be, NULL );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_open: last_id(%s) failed: %s (%d)\n", bdb->bi_dbenv_home, db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_open: last_id(%s) failed: %s (%d)\n",
+ bdb->bi_dbenv_home, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_open: last_id(%s) failed: %s (%d)\n",
rc = TXN_CHECKPOINT( bdb->bi_dbenv, 0, 0, DB_FORCE );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_destroy: txn_checkpoint failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_destroy: txn_checkpoint failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_destroy: txn_checkpoint failed: %s (%d)\n",
bdb->bi_dbenv = NULL;
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_destroy: close failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_destroy: close failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_db_destroy: close failed: %s (%d)\n",
/* initialize the underlying database system */
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ENTRY, "bdb_db_initialize\n" ));
+ LDAP_LOG( BACK_BDB, ENTRY, "bdb_db_initialize\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_open: initialize BDB backend\n",
0, 0, 0 );
patch < DB_VERSION_PATCH )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_ERR, "bdb_db_initialize: version mismatch: \texpected: %s \tgot: %s\n", DB_VERSION_STRING, version ));
+ LDAP_LOG( BACK_BDB, ERR,
+ "bdb_db_initialize: version mismatch: "
+ "\texpected: %s \tgot: %s\n", DB_VERSION_STRING, version, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_open: version mismatch\n"
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "init", LDAP_LEVEL_DETAIL1, "bdb_db_initialize: bdb_open: %s\n", version ));
+ LDAP_LOG( BACK_BDB, DETAIL1,
+ "bdb_db_initialize: bdb_open: %s\n", version, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "bdb_open: %s\n",
version, 0, 0 );
DBT key;
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "key_read: enter\n" ));
+ LDAP_LOG( INDEX, ENTRY, "key_read: enter\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> key_read\n", 0, 0, 0 );
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ERR,
- "bdb_key_read: failed (%d)\n",
- rc ));
+ LDAP_LOG( INDEX, ERR, "bdb_key_read: failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_index_read: failed (%d)\n",
rc, 0, 0 );
#endif
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_DETAIL1,
- "bdb_key_read: %ld candidates\n", (long) BDB_IDL_N(ids) ));
+ LDAP_LOG( INDEX, DETAIL1,
+ "bdb_key_read: %ld candidates\n", (long)BDB_IDL_N(ids), 0, 0);
#else
Debug( LDAP_DEBUG_TRACE, "<= bdb_index_read %ld candidates\n",
(long) BDB_IDL_N(ids), 0, 0 );
DBT key;
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_DETAIL1,
- "key_change: %s ID %lx\n",
- op == SLAP_INDEX_ADD_OP ? "Add" : "Delete", (long) id ));
+ LDAP_LOG( INDEX, ENTRY, "key_change: %s ID %lx\n",
+ op == SLAP_INDEX_ADD_OP ? "Add" : "Delete", (long) id, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> key_change(%s,%lx)\n",
op == SLAP_INDEX_ADD_OP ? "ADD":"DELETE", (long) id, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_RESULTS,
- "key_change: return %d\n", rc ));
+ LDAP_LOG( INDEX, RESULTS, "key_change: return %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= key_change %d\n", rc, 0, 0 );
#endif
Attribute *ap;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ENTRY,"bdb_modify_internal: 0x%08lx: %s\n", e->e_id, e->e_dn ));
+ LDAP_LOG ( OPERATION, ENTRY, "bdb_modify_internal: 0x%08lx: %s\n",
+ e->e_id, e->e_dn, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_modify_internal: 0x%08lx: %s\n",
e->e_id, e->e_dn, 0);
switch ( mod->sm_op ) {
case LDAP_MOD_ADD:
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_DETAIL1, "bdb_modify_internal: add\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1, "bdb_modify_internal: add\n", 0,0,0);
#else
Debug(LDAP_DEBUG_ARGS, "bdb_modify_internal: add\n", 0, 0, 0);
#endif
err = modify_add_values( e, mod, text, textbuf, textlen );
if( err != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify_internal: %d %s\n", err, *text ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify_internal: %d %s\n", err, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "bdb_modify_internal: %d %s\n",
err, *text, 0);
case LDAP_MOD_DELETE:
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_DETAIL1, "bdb_modify_internal: delete\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_modify_internal: delete\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "bdb_modify_internal: delete\n", 0, 0, 0);
#endif
assert( err != LDAP_TYPE_OR_VALUE_EXISTS );
if( err != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify_internal: %d %s\n", err, *text ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify_internal: %d %s\n", err, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "bdb_modify_internal: %d %s\n",
err, *text, 0);
case LDAP_MOD_REPLACE:
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_DETAIL1, "bdb_modify_internal: replace\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_modify_internal: replace\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "bdb_modify_internal: replace\n", 0, 0, 0);
#endif
err = modify_replace_values( e, mod, text, textbuf, textlen );
if( err != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify_internal: %d %s\n", err, *text ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify_internal: %d %s\n", err, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "bdb_modify_internal: %d %s\n",
err, *text, 0);
case SLAP_MOD_SOFTADD:
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_DETAIL1, "bdb_modify_internal: softadd\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_modify_internal: softadd\n",0,0,0 );
#else
Debug(LDAP_DEBUG_ARGS, "bdb_modify_internal: softadd\n", 0, 0, 0);
#endif
if( err != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify_internal: %d %s\n", err, *text ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify_internal: %d %s\n", err, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "bdb_modify_internal: %d %s\n",
err, *text, 0);
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify_internal: invalid op %d\n", mod->sm_op ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify_internal: invalid op %d\n", mod->sm_op, 0, 0 );
#else
Debug(LDAP_DEBUG_ANY, "bdb_modify_internal: invalid op %d\n",
mod->sm_op, 0, 0);
*text = "Invalid modify operation";
err = LDAP_OTHER;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify_internal: %d %s\n", err, *text ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify_internal: %d %s\n", err, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "bdb_modify_internal: %d %s\n",
err, *text, 0);
attrs_free( e->e_attrs );
e->e_attrs = save_attrs;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify_internal: entry failed schema check %s\n", *text ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify_internal: entry failed schema check %s\n",
+ *text, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "entry failed schema check: %s\n",
*text, 0, 0 );
attrs_free( e->e_attrs );
e->e_attrs = save_attrs;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify_internal: attribute index delete failure\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify_internal: attribute index delete failure\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Attribute index delete failure",
attrs_free( e->e_attrs );
e->e_attrs = save_attrs;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify_internal: attribute index add failure\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify_internal: attribute index add failure\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Attribute index add failure",
DB_LOCK lock;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ENTRY, "bdb_modify: %s\n", dn->bv_val ));
+ LDAP_LOG ( OPERATION, ENTRY, "bdb_modify: %s\n", dn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "bdb_modify: %s\n", dn->bv_val, 0, 0 );
#endif
bdb_unlocked_cache_return_entry_w(&bdb->bi_cache, e);
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_DETAIL1, "bdb_modify: retrying...\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1, "bdb_modify: retrying...\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE,
"bdb_modify: retrying...\n", 0, 0, 0);
text = NULL;
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_DETAIL1, "bdb_modify: txn_begin failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_modify: txn_begin failed: %s (%d)\n", db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modify: txn_begin failed: %s (%d)\n",
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_DETAIL1, "bdb_modify: dn2entry failed: (%d)\n", rc ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_modify: dn2entry failed: (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modify: dn2entry failed (%d)\n",
conn, op, e );
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_DETAIL1, "bdb_modify: entry is referral\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1, "bdb_modify: entry is referral\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modify: entry is referral\n",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify: modify failed (%d)\n", rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify: modify failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modify: modify failed (%d)\n",
rc = bdb_id2entry_update( be, ltid, e );
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify: id2entry update failed (%d)\n", rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify: id2entry update failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modify: id2entry update failed (%d)\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_ERR, "bdb_modify: txn_%s failed %s (%d)\n", op->o_noop ? "abort (no_op)" : "commit", db_strerror(rc), rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify: txn_%s failed %s (%d)\n",
+ op->o_noop ? "abort (no_op)" : "commit", db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modify: txn_%s failed: %s (%d)\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modify", LDAP_LEVEL_DETAIL1, "bdb_modify: updated%s id=%08lx dn=\"%s\"\n", op->o_noop ? " (no_op)" : "", e->e_id, e->e_dn ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_modify: updated%s id=%08lx dn=\"%s\"\n",
+ op->o_noop ? " (no_op)" : "", e->e_id, e->e_dn );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modify: updated%s id=%08lx dn=\"%s\"\n",
DB_LOCK lock;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ENTRY, "==>bdb_modrdn(%s,%s,%s)\n",
- dn->bv_val,newrdn->bv_val,
- newSuperior ? newSuperior->bv_val : "NULL" ));
+ LDAP_LOG ( OPERATION, ENTRY, "==>bdb_modrdn(%s,%s,%s)\n",
+ dn->bv_val,newrdn->bv_val, newSuperior ? newSuperior->bv_val : "NULL" );
#else
Debug( LDAP_DEBUG_TRACE, "==>bdb_modrdn(%s,%s,%s)\n",
dn->bv_val, newrdn->bv_val,
bdb_unlocked_cache_return_entry_r(&bdb->bi_cache, np);
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: retrying...\n"));
+ LDAP_LOG ( OPERATION, DETAIL1, "==>bdb_modrdn: retrying...\n", 0, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE, "==>bdb_modrdn: retrying...\n", 0, 0, 0 );
#endif
text = NULL;
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "==>bdb_modrdn: txn_begin failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "==>bdb_modrdn: txn_begin failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_delete: txn_begin failed: %s (%d)\n",
conn, op, e );
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: entry %s is referral \n", e->e_dn ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: entry %s is referral \n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry %s is referral\n",
e->e_dn, 0, 0 );
if( p == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "==>bdb_modrdn: parent does not exist\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "==>bdb_modrdn: parent does not exist\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: parent does not exist\n",
0, 0, 0);
children, NULL, ACL_WRITE, NULL ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "==>bdb_modrdn: no access to parent\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "==>bdb_modrdn: no access to parent\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "no access to parent\n", 0,
0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: wr to children %s is OK\n", p_ndn.bv_val ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: wr to children %s is OK\n", p_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: wr to children of entry %s OK\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: parent dn=%s\n", p_dn.bv_val ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: parent dn=%s\n", p_dn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: parent dn=%s\n",
if ( ! rc )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "==>bdb_modrdn: no access to parent\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "==>bdb_modrdn: no access to parent\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"no access to parent\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: wr to children of entry \"\" OK\n", p_dn.bv_val ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: wr to children of entry \"%s\" OK\n",
+ p_dn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: wr to children of entry \"\" OK\n",
p_dn.bv_len = 0;
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: parent dn=\"\" \n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: parent dn=\"\" \n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: parent dn=\"\"\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "==>bdb_modrdn: no parent, not root &\"\" is not suffix\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "==>bdb_modrdn: no parent, not root &\"\" is not "
+ "suffix\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: no parent, not root "
if ( newSuperior != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: new parent \"%s\" requested...\n", newSuperior->bv_val ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: new parent \"%s\" requested...\n",
+ newSuperior->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: new parent \"%s\" requested...\n",
if( np == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: newSup(ndn=%s) not here!\n", np_ndn->bv_val ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: newSup(ndn=%s) not here!\n",
+ np_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: newSup(ndn=%s) not here!\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: wr to new parent OK np=%p, id=%ld\n", np, (long) np->e_id ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: wr to new parent OK np=%p, id=%ld\n",
+ np, (long) np->e_id, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: wr to new parent OK np=%p, id=%ld\n",
/* check newSuperior for "children" acl */
if ( !access_allowed( be, conn, op, np, children, NULL, ACL_WRITE, NULL ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: no wr to newSup children\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: no wr to newSup children\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: no wr to newSup children\n",
if ( is_entry_alias( np ) ) {
/* parent is an alias, don't allow add */
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: entry is alias\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: entry is alias\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry is alias\n",
0, 0, 0 );
if ( is_entry_referral( np ) ) {
/* parent is a referral, don't allow add */
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: entry is referral\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "==>bdb_modrdn: entry is referral\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry is referral\n",
0, 0, 0 );
if ( ! rc )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "==>bdb_modrdn: no access to superior\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "==>bdb_modrdn: no access to superior\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"no access to new superior\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "bdb_modrdn: wr to children entry \"\" OK\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_modrdn: wr to children entry \"\" OK\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: wr to children of entry \"\" OK\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: new superior=\"\", not root & \"\" is not suffix\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: new superior=\"\", not root & \"\" "
+ "is not suffix\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: new superior=\"\", not root "
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "bdb_modrdn: new superior=\"\"\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_modrdn: new superior=\"\"\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: new superior=\"\"\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "bdb_modrdn: wr to new parent's children OK\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_modrdn: wr to new parent's children OK\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: wr to new parent's children OK\n",
dnNormalize2( NULL, &new_dn, &new_ndn );
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_RESULTS, "bdb_modrdn: new ndn=%s\n", new_ndn.bv_val ));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "bdb_modrdn: new ndn=%s\n", new_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: new ndn=%s\n",
new_ndn.bv_val, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: new ndn=%s does not exist\n", new_ndn.bv_val ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: new ndn=%s does not exist\n", new_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: new ndn=%s does not exist\n",
LDAP_DN_FORMAT_LDAP ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: can't figure out type(s)/values(s) of newrdn\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: can't figure out type(s)/values(s) of newrdn\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: can't figure out type(s)/values(s) "
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_RESULTS, "bdb_modrdn: new_rdn_type=\"%s\", new_rdn_val=\"%s\"\n", new_rdn[0][0]->la_attr.bv_val, new_rdn[0][0]->la_value.bv_val ));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "bdb_modrdn: new_rdn_type=\"%s\", new_rdn_val=\"%s\"\n",
+ new_rdn[0][0]->la_attr.bv_val, new_rdn[0][0]->la_value.bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: new_rdn_type=\"%s\", new_rdn_val=\"%s\"\n",
LDAP_DN_FORMAT_LDAP ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: can't figure out type(s)/values(s) of old_rdn\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: can't figure out type(s)/values(s) of old_rdn\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_back_modrdn: can't figure out the old_rdn "
( const char ** )new_rdn_types ) != 0 ) {
/* Not a big deal but we may say something */
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: old_rdn_type(s)=%s, new_rdn_type(s)=%s do not match\n", old_rdn_types[ 0 ], new_rdn_types[ 0 ] ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: old_rdn_type(s)=%s, new_rdn_type(s)=%s do not match\n",
+ old_rdn_types[ 0 ], new_rdn_types[ 0 ], 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: old_rdn_type(s)=%s, new_rdn_type(s)=%s "
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: %s: %s (new)\n", text, new_rdn[0][a_cnt]->la_attr.bv_val ));
+ LDAP_LOG ( OPERATION, ERR, "bdb_modrdn: %s: %s (new)\n",
+ text, new_rdn[0][a_cnt]->la_attr.bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: %s: %s (new)\n",
if ( !access_allowed( be, conn, op, e, desc,
&new_rdn[0][ a_cnt ]->la_value, ACL_WRITE, NULL ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: access to attr \"%s\" (new) not allowed\n", new_rdn[0][a_cnt]->la_attr.bv_val ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: access to attr \"%s\" (new) not allowed\n",
+ new_rdn[0][a_cnt]->la_attr.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: access to attr \"%s\" "
/* Get value of old rdn */
if ( old_rdn == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: can't figure out old RDN values(s) from old RDN\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: can't figure out old RDN values(s) "
+ "from old RDN\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: can't figure out old RDN value(s) "
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: %s: %s (old)\n", text, old_rdn[0][d_cnt]->la_attr.bv_val ));
+ LDAP_LOG ( OPERATION, ERR, "bdb_modrdn: %s: %s (old)\n",
+ text, old_rdn[0][d_cnt]->la_attr.bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: %s: %s (old)\n",
if ( !access_allowed( be, conn, op, e, desc,
&old_rdn[0][d_cnt]->la_value, ACL_WRITE, NULL ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: access to attr \"%s\" (old) not allowed\n", old_rdn[0][d_cnt]->la_attr.bv_val ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: access to attr \"%s\" (old) not allowed\n",
+ old_rdn[0][d_cnt]->la_attr.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_modrdn: access to attr \"%s\" "
if( rc == LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_RESULTS, "bdb_modrdn: rdn modified%s id=%08lx dn=\"%s\"\n", op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn ));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "bdb_modrdn: rdn modified%s id=%08lx dn=\"%s\"\n",
+ op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn );
#else
Debug(LDAP_DEBUG_TRACE,
"bdb_modrdn: rdn modified%s id=%08lx dn=\"%s\"\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "modrdn", LDAP_LEVEL_RESULTS, "bdb_modrdn: %s : %s (%d)\n", text, db_strerror(rc), rc ));
+ LDAP_LOG ( OPERATION, RESULTS, "bdb_modrdn: %s : %s (%d)\n",
+ text, db_strerror(rc), rc );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_add: %s : %s (%d)\n",
text, db_strerror(rc), rc );
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "nextid", LDAP_LEVEL_ERR,
- "bdb_last_id: get failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ LDAP_LOG ( INDEX, ERR, "bdb_last_id: get failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_last_id: get failed: %s (%d)\n",
Attribute **aa = a;
int rc;
DB_TXN *ltid = NULL;
- struct bdb_op_info opinfo;
+ struct bdb_op_info opinfo;
assert( e );
}
#endif
#ifdef NEW_LOGGING
- LDAP_LOG (( "operational", LDAP_LEVEL_DETAIL1,
- "=> bdb_operational: retrying...\n" ));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "=> bdb_operational: retrying...\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "==> bdb_operational: retrying...\n",
0, 0, 0 );
rc = TXN_BEGIN( bdb->bi_dbenv, NULL, <id, bdb->bi_db_opflags );
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operational", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"=> bdb_operational: txn_begin failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_operational: txn_begin failed: %s (%d)\n",
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "operational", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"=> bdb_operational: has_children failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ db_strerror(rc), rc, 0 );
#else
Debug(LDAP_DEBUG_ARGS,
"<=- bdb_operational: has_children failed: %s (%d)\n",
&id, NULL, &new, text );
#ifdef NEW_LOGGING
- LDAP_LOG (( "passwd", LDAP_LEVEL_ENTRY, "==>bdb_exop_passwd: \"%s\"\n",
- id.bv_val ? id.bv_val : "" ));
+ LDAP_LOG ( ACL, ENTRY,
+ "==>bdb_exop_passwd: \"%s\"\n", id.bv_val ? id.bv_val : "", 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "==> bdb_exop_passwd: \"%s\"\n",
id.bv_val ? id.bv_val : "", 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "passwd", LDAP_LEVEL_DETAIL1, "bdb_exop_passwd: \"%s\"%s\"\n",
- dn.bv_val, id.bv_len ? " (proxy)" : "" ));
+ LDAP_LOG ( ACL, DETAIL1, "bdb_exop_passwd: \"%s\"%s\"\n",
+ dn.bv_val, id.bv_len ? " (proxy)" : "", 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_exop_passwd: \"%s\"%s\n",
dn.bv_val, id.bv_len ? " (proxy)" : "", 0 );
bdb_cache_return_entry_w(bdb->bi_dbenv, &bdb->bi_cache, e, &lock);
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "passwd", LDAP_LEVEL_DETAIL1, "bdb_exop_passwd: retrying...\n" ));
+ LDAP_LOG ( ACL, DETAIL1, "bdb_exop_passwd: retrying...\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_exop_passwd: retrying...\n", 0, 0, 0 );
#endif
*text = NULL;
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "passwd", LDAP_LEVEL_ERR, "bdb_exop_passwd: txn_begin failed: %s (%d)\n", db_strerror(rc), rc ));
+ LDAP_LOG ( ACL, ERR,
+ "bdb_exop_passwd: txn_begin failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_exop_passwd: txn_begin failed: %s (%d)\n",
goto dn2entry_retry;
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "referral", LDAP_LEVEL_ERR,
- "bdb_referrals: dn2entry failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_referrals: dn2entry failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_referrals: dn2entry failed: %s (%d)\n",
matched_dn = ch_strdup( matched->e_dn );
#ifdef NEW_LOGGING
- LDAP_LOG (( "referral", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
- (long) op->o_tag, dn->bv_val, matched_dn ));
+ (long) op->o_tag, dn->bv_val, matched_dn );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
refs, &e->e_name, dn, LDAP_SCOPE_DEFAULT );
#ifdef NEW_LOGGING
- LDAP_LOG (( "referral", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
- (long) op->o_tag, dn->bv_val, e->e_dn ));
+ (long) op->o_tag, dn->bv_val, e->e_dn );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
DB_LOCK lock;
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_ENTRY,"bdb_back_search\n"));
+ LDAP_LOG ( OPERATION, ENTRY, "bdb_back_search\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_back_search\n",
0, 0, 0);
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_RESULTS,"bdb_search: entry is referral\n"));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "bdb_search: entry is referral\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_search: entry is referral\n",
0, 0, 0 );
if ( candidates[0] == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_RESULTS,"bdb_search: no candidates\n"));
+ LDAP_LOG ( OPERATION, RESULTS, "bdb_search: no candidates\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "bdb_search: no candidates\n",
0, 0, 0 );
if( !BDB_IDL_IS_RANGE(candidates) ) {
/* only complain for non-range IDLs */
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_RESULTS,"bdb_search: candidate %ld not found\n", (long) id));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "bdb_search: candidate %ld not found\n", (long) id, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_search: candidate %ld not found\n",
} else if ( dnIsSuffix( &e->e_nname, &realbase ) ) {
/* alias is within scope */
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_RESULTS,"bdb_search: \"%s\" in subtree\n", e->edn));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "bdb_search: \"%s\" in subtree\n", e->edn, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_search: \"%s\" in subtree\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL2,
+ LDAP_LOG(OPERATION, DETAIL2,
"bdb_search: candidate referral %ld scope not okay\n",
- id ));
+ id, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_search: candidate referral %ld scope not okay\n",
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_RESULTS,"bdb_search: %ld scope not okay\n", (long) id));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "bdb_search: %ld scope not okay\n", (long) id, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_search: %ld scope not okay\n",
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_RESULTS,"bdb_search: %ld does match filter\n", (long) id));
+ LDAP_LOG ( OPERATION, RESULTS,
+ "bdb_search: %ld does match filter\n", (long) id, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"bdb_search: %ld does match filter\n",
ID *ids )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_ENTRY,"base_candidate: base: \"%s\" (0x%08lx)\n", e->e_dn, (long) e->e_id));
+ LDAP_LOG ( OPERATION, ENTRY,
+ "base_candidate: base: \"%s\" (0x%08lx)\n", e->e_dn, (long) e->e_id, 0);
#else
Debug(LDAP_DEBUG_ARGS, "base_candidates: base: \"%s\" (0x%08lx)\n",
e->e_dn, (long) e->e_id, 0);
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_ENTRY,"search_candidates: base=\"%s\" (0x%08lx) scope=%d\n", e->e_dn, (long) e->e_id, scope));
+ LDAP_LOG ( OPERATION, ENTRY,
+ "search_candidates: base=\"%s\" (0x%08lx) scope=%d\n",
+ e->e_dn, (long) e->e_id, scope);
#else
Debug(LDAP_DEBUG_TRACE,
"search_candidates: base=\"%s\" (0x%08lx) scope=%d\n",
if( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_DETAIL1,"bdb_search_candidates: failed (rc=%d)\n", rc));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_search_candidates: failed (rc=%d)\n", rc, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE,
"bdb_search_candidates: failed (rc=%d)\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "search", LDAP_LEVEL_DETAIL1,"bdb_search_candidates: id=%ld first=%ld last=%ld\n", (long) ids[0], (long) BDB_IDL_FIRST(ids), (long) BDB_IDL_LAST(ids)));
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_search_candidates: id=%ld first=%ld last=%ld\n",
+ (long) ids[0], (long) BDB_IDL_FIRST(ids),
+ (long) BDB_IDL_LAST(ids));
#else
Debug(LDAP_DEBUG_TRACE,
"bdb_search_candidates: id=%ld first=%ld last=%ld\n",
assert( text->bv_val[0] == '\0' );
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ARGS,
- "=> bdb_tool_entry_put( %ld, \"%s\" )\n",
- (long) e->e_id, e->e_dn ));
+ LDAP_LOG ( TOOLS, ARGS, "=> bdb_tool_entry_put( %ld, \"%s\" )\n",
+ (long) e->e_id, e->e_dn, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_tool_entry_put( %ld, \"%s\" )\n",
(long) e->e_id, e->e_dn, 0 );
"txn_begin failed: %s (%d)",
db_strerror(rc), rc );
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
- "=> bdb_tool_entry_put: %s\n", text->bv_val ));
+ LDAP_LOG ( TOOLS, ERR, "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_put: %s\n",
"next_id failed: %s (%d)",
db_strerror(rc), rc );
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
- "=> bdb_tool_entry_put: %s\n", text->bv_val ));
+ LDAP_LOG ( TOOLS, ERR,
+ "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
"dn2id_add failed: %s (%d)",
db_strerror(rc), rc );
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
- "=> bdb_tool_entry_put: %s\n", text->bv_val ));
+ LDAP_LOG ( TOOLS, ERR,
+ "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
"id2entry_add failed: %s (%d)",
db_strerror(rc), rc );
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
- "=> bdb_tool_entry_put: %s\n", text->bv_val ));
+ LDAP_LOG ( TOOLS, ERR,
+ "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
"index_entry_add failed: %s (%d)",
db_strerror(rc), rc );
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
- "=> bdb_tool_entry_put: %s\n", text->bv_val ));
+ LDAP_LOG ( TOOLS, ERR,
+ "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
"txn_commit failed: %s (%d)",
db_strerror(rc), rc );
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
- "=> bdb_tool_entry_put: %s\n", text->bv_val ));
+ LDAP_LOG ( TOOLS, ERR,
+ "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_put: %s\n",
"txn_aborted! %s (%d)",
db_strerror(rc), rc );
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
- "=> bdb_tool_entry_put: %s\n", text->bv_val ));
+ LDAP_LOG ( TOOLS, ERR,
+ "=> bdb_tool_entry_put: %s\n", text->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_put: %s\n",
struct berval pdn;
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ARGS,
- "=> bdb_tool_entry_reindex( %ld )\n", (long) id ));
+ LDAP_LOG ( TOOLS, ARGS,
+ "=> bdb_tool_entry_reindex( %ld )\n", (long) id, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "=> bdb_tool_entry_reindex( %ld )\n",
(long) id, 0, 0 );
if( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( TOOLS, DETAIL1,
"bdb_tool_entry_reindex:: could not locate id=%ld\n",
- (long) id ));
+ (long) id, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"bdb_tool_entry_reindex:: could not locate id=%ld\n",
rc = TXN_BEGIN( bi->bi_dbenv, NULL, &tid, bi->bi_db_opflags );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
+ LDAP_LOG ( TOOLS, ERR,
"=> bdb_tool_entry_reindex: txn_begin failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_reindex: txn_begin failed: %s (%d)\n",
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
- "=> bdb_tool_entry_reindex( %ld, \"%s\" )\n",
- (long) id, e->e_dn ));
+ LDAP_LOG ( TOOLS, ERR,
+ "=> bdb_tool_entry_reindex( %ld, \"%s\" )\n", (long) id, e->e_dn, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> bdb_tool_entry_reindex( %ld, \"%s\" )\n",
(long) id, e->e_dn, 0 );
rc = bdb_dn2id_add( be, tid, &pdn, e );
if( rc != 0 && rc != DB_KEYEXIST ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
+ LDAP_LOG ( TOOLS, ERR,
"=> bdb_tool_entry_reindex: dn2id_add failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_reindex: dn2id_add failed: %s (%d)\n",
rc = TXN_COMMIT( tid, 0 );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_ERR,
+ LDAP_LOG ( TOOLS, ERR,
"=> bdb_tool_entry_reindex: txn_commit failed: %s (%d)\n",
- db_strerror(rc), rc ));
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_reindex: txn_commit failed: %s (%d)\n",
} else {
TXN_ABORT( tid );
#ifdef NEW_LOGGING
- LDAP_LOG (( "tools", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( TOOLS, DETAIL1,
"=> bdb_tool_entry_reindex: txn_aborted! %s (%d)\n",
- db_strerror(rc), rc ));
+ db_strerror(rc), rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"=> bdb_tool_entry_reindex: txn_aborted! %s (%d)\n",
struct berval mdn = { 0, NULL };
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY, "ldap_back_add: %s\n",
- e->e_dn ));
+ LDAP_LOG( BACK_LDAP, ENTRY, "ldap_back_add: %s\n", e->e_dn, 0, 0 );
#else /* !NEW_LOGGING */
Debug(LDAP_DEBUG_ARGS, "==> ldap_back_add: %s\n", e->e_dn, 0, 0);
#endif /* !NEW_LOGGING */
mdn = e->e_name;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] addDn: \"%s\" -> \"%s\"\n",
- e->e_dn, mdn.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] addDn: \"%s\" -> \"%s\"\n", e->e_dn, mdn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> addDn: \"%s\" -> \"%s\"\n%s",
e->e_dn, mdn.bv_val, "" );
continue;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] bindDn (in add of dn-valued"
- " attr): \"%s\" -> \"%s\"\n",
- a_vals->bv_val, mattr ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] bindDn (in add of dn-valued"
+ " attr): \"%s\" -> \"%s\"\n", a_vals->bv_val, mattr, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> bindDn (in add of dn-valued attr):"
mdn.bv_val = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] bindDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] bindDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> bindDn: \"%s\" -> \"%s\"\n%s",
dn->bv_val, mdn.bv_val, "" );
ber_dupbv( &lc->bound_dn, &lc->conn->c_dn );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] bindDn: \"%s\" ->"
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] bindDn: \"%s\" ->"
" \"%s\"\n%s",
- lc->conn->c_dn.bv_val,
- lc->bound_dn.bv_val ));
+ lc->conn->c_dn.bv_val,
+ lc->bound_dn.bv_val, "" );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> bindDn: \"%s\" ->"
ldap_pvt_thread_mutex_unlock( &li->conn_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldap_back_getconn: conn %ld inserted\n",
- lc->conn->c_connid ));
+ LDAP_LOG( BACK_LDAP, INFO,
+ "ldap_back_getconn: conn %ld inserted\n", lc->conn->c_connid, 0, 0);
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_TRACE,
"=>ldap_back_getconn: conn %ld inserted\n%s%s",
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldap_back_getconn: conn %ld inserted\n",
- lc->conn->c_connid ));
+ LDAP_LOG( BACK_LDAP, INFO,
+ "ldap_back_getconn: conn %ld inserted\n",
+ lc->conn->c_connid, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_TRACE,
"=>ldap_back_getconn: conn %ld fetched%s%s\n",
mdn.bv_val = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] compareDn: \"%s\" -> \"%s\"\n",
- dn->bv_val, mdn.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] compareDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> compareDn: \"%s\" -> \"%s\"\n%s",
dn->bv_val, mdn.bv_val, "" );
mdn.bv_val = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] deleteDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] deleteDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> deleteDn: \"%s\" -> \"%s\"\n%s",
dn->bv_val, mdn.bv_val, "" );
mop_ndn = *op_ndn;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] bindDn (op ndn in group):"
- " \"%s\" -> \"%s\"\n", op_ndn->bv_val, mop_ndn.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] bindDn (op ndn in group): \"%s\" -> \"%s\"\n",
+ op_ndn->bv_val, mop_ndn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> bindDn (op ndn in group): \"%s\" -> \"%s\"\n%s",
mgr_ndn = *gr_ndn;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] searchBase (gr ndn in group):"
- " \"%s\" -> \"%s\"\n%s", gr_ndn->bv_val, mgr_ndn.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] searchBase (gr ndn in group): \"%s\" -> \"%s\"\n%s",
+ gr_ndn->bv_val, mgr_ndn.bv_val, "" );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> searchBase (gr ndn in group):"
mdn.bv_val = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] modifyDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] modifyDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> modifyDn: \"%s\" -> \"%s\"\n%s",
dn->bv_val, mdn.bv_val, "" );
mnewSuperior.bv_val = ( char * )newSuperior;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] newSuperiorDn:"
- " \"%s\" -> \"%s\"\n",
- newSuperior, mnewSuperior.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] newSuperiorDn:" " \"%s\" -> \"%s\"\n",
+ newSuperior, mnewSuperior.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> newSuperiorDn:"
" \"%s\" -> \"%s\"\n%s",
mdn.bv_val = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] modrDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] modrDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> modrDn: \"%s\" -> \"%s\"\n%s",
dn->bv_val, mdn.bv_val, "" );
mbase = *base;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] searchBase: \"%s\" -> \"%s\"\n%",
- base->bv_val, mbase.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] searchBase: \"%s\" -> \"%s\"\n",
+ base->bv_val, mbase.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> searchBase: \"%s\" -> \"%s\"\n%s",
base->bv_val, mbase.bv_val, "" );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] searchFilter: \"%s\" -> \"%s\"\n",
- filterstr->bv_val, mfilter.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] searchFilter: \"%s\" -> \"%s\"\n",
+ filterstr->bv_val, mfilter.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> searchFilter: \"%s\" -> \"%s\"\n%s",
mmatch = ( char * )match;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] matchedDn:"
- " \"%s\" -> \"%s\"\n",
- match, mmatch ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] matchedDn:" " \"%s\" -> \"%s\"\n", match, mmatch, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> matchedDn:"
" \"%s\" -> \"%s\"\n%s",
ent.e_name = bdn;
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] searchResult: \"%s\""
- " -> \"%s\"\n", bdn.bv_val, ent.e_dn ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] searchResult: \"%s\"" " -> \"%s\"\n",
+ bdn.bv_val, ent.e_dn, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> searchResult: \"%s\""
" -> \"%s\"\n%s", bdn.bv_val, ent.e_dn, "" );
if (slap_bv2undef_ad(&mapped, &attr->a_desc, &text)
!= LDAP_SUCCESS) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "slap_bv2undef_ad(%s): "
- "%s\n", mapped.bv_val, text ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "slap_bv2undef_ad(%s): %s\n", mapped.bv_val, text, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
"slap_bv2undef_ad(%s): "
}
newval.bv_len = strlen( newval.bv_val );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend",
- LDAP_LEVEL_DETAIL1,
- "[rw] searchResult on"
- " attr=%s:"
- " \"%s\" -> \"%s\"\n",
- attr->a_desc->ad_type->sat_cname.bv_val,
- bv->bv_val,
- newval.bv_val ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "[rw] searchResult on attr=%s: \"%s\" -> \"%s\"\n",
+ attr->a_desc->ad_type->sat_cname.bv_val,
+ bv->bv_val, newval.bv_val );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> searchResult on attr=%s: \"%s\" -> \"%s\"\n",
strncpy( res->bv_val, dn->bv_val, diff );
strcpy( &res->bv_val[diff], li->suffix_massage[i+dst].bv_val );
#ifdef NEW_LOGGING
- LDAP_LOG (( "suffixmassage", LDAP_LEVEL_ARGS,
+ LDAP_LOG ( BACK_LDAP, ARGS,
"ldap_back_dn_massage: converted \"%s\" to \"%s\"\n",
- dn->bv_val, res->bv_val ));
+ dn->bv_val, res->bv_val, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"ldap_back_dn_massage:"
struct ldapconn *lc, lc_curr;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldap_back_conn_destroy: fetching conn %ld\n",
- conn->c_connid ));
+ LDAP_LOG( BACK_LDAP, INFO,
+ "ldap_back_conn_destroy: fetching conn %ld\n", conn->c_connid, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_TRACE,
"=>ldap_back_conn_destroy: fetching conn %ld\n",
if (lc) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldap_back_conn_destroy: destroying conn %ld\n",
- conn->c_connid ));
+ LDAP_LOG( BACK_LDAP, DETAIL1,
+ "ldap_back_conn_destroy: destroying conn %ld\n",
+ conn->c_connid, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_TRACE,
"=>ldap_back_conn_destroy: destroying conn %ld\n",
size_t textlen = sizeof textbuf;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,"ldbm_back_add: %s\n",
- e->e_dn ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_back_add: %s\n", e->e_dn, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "==> ldbm_back_add: %s\n", e->e_dn, 0, 0);
#endif
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_add: entry (%s) failed schema check.\n",
- e->e_dn ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_add: entry (%s) failed schema check.\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry failed schema check: %s\n",
text, 0, 0 );
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_add: Parent of (%s) does not exist.\n",
- e->e_dn ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_add: Parent of (%s) does not exist.\n",
+ e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "parent does not exist\n",
0, 0, 0 );
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_add: No write access to parent (%s).\n",
- e->e_dn ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_add: No write access to parent (%s).\n",
+ e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "no write access to parent\n", 0,
0, 0 );
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_add: Parent is an alias.\n"));
+ LDAP_LOG(BACK_LDBM, ERR,
+ "ldbm_back_add: Parent is an alias.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "parent is alias\n", 0,
0, 0 );
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_add: Parent is referral.\n" ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_add: Parent is referral.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "parent is referral\n", 0,
0, 0 );
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+ LDAP_LOG( BACK_LDBM, ERR,
"ldbm_back_add: No write "
- "access to parent (\"\").\n" ));
+ "access to parent (\"\").\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"no write access to parent\n",
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+ LDAP_LOG( BACK_LDBM, ERR,
"ldbm_back_add: %s add denied.\n",
pdn.bv_val == NULL ? "suffix"
- : "entry at root" ));
+ : "entry at root", 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "%s add denied\n",
pdn.bv_val == NULL ? "suffix"
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_add: next_id failed.\n" ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_add: next_id failed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ldbm_add: next_id failed\n",
0, 0, 0 );
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_add: cache_add_entry_lock failed.\n" ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_add: cache_add_entry_lock failed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "cache_add_entry_lock failed\n", 0, 0,
0 );
/* attribute indexes */
if ( index_entry_add( be, e, e->e_attrs ) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_add: index_entry_add failed.\n" ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_add: index_entry_add failed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "index_entry_add failed\n", 0,
0, 0 );
/* dn2id index */
if ( dn2id_add( be, &e->e_nname, e->e_id ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_add: dn2id_add failed.\n" ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_add: dn2id_add failed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "dn2id_add failed\n", 0,
0, 0 );
/* id2entry index */
if ( id2entry_add( be, e ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_add: id2entry_add failed.\n" ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_add: id2entry_add failed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "id2entry_add failed\n", 0,
0, 0 );
#include "slap.h"
#include "back-ldbm.h"
-
/* for the cache of attribute information (which are indexed, etc.) */
typedef struct ldbm_attrinfo {
AttributeDescription *ai_desc; /* attribute description cn;lang-en */
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "attr_index_config: index %s 0x%04lx\n",
- ad->ad_cname.bv_val, mask ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "attr_index_config: index %s 0x%04lx\n",
+ ad->ad_cname.bv_val, mask, 0 );
#else
Debug( LDAP_DEBUG_CONFIG, "index %s 0x%04lx\n",
ad->ad_cname.bv_val, mask, 0 );
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
-
/* return LDAP_SUCCESS IFF we can retrieve the attributes
* of entry with e_ndn
*/
int nvals = 0;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ARGS,
- "ldbm_back_attribute: gr dn: \"%s\"\n", entry_ndn->bv_val ));
- LDAP_LOG(( "backend", LDAP_LEVEL_ARGS,
- "ldbm_back_attribute: at: \"%s\"\n", entry_at_name));
- LDAP_LOG(( "backend", LDAP_LEVEL_ARGS,
- "ldbm_back_attribute: tr dn: \"%s\"\n",
- target ? target->e_ndn : "" ));
+ LDAP_LOG( BACK_LDBM, ARGS,
+ "ldbm_back_attribute: gr dn: \"%s\"\n", entry_ndn->bv_val, 0, 0 );
+ LDAP_LOG( BACK_LDBM, ARGS,
+ "ldbm_back_attribute: at: \"%s\"\n", entry_at_name, 0, 0);
+ LDAP_LOG( BACK_LDBM, ARGS, "ldbm_back_attribute: tr dn: \"%s\"\n",
+ target ? target->e_ndn : "", 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"=> ldbm_back_attribute: gr dn: \"%s\"\n",
/* we already have a LOCKED copy of the entry */
e = target;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_attribute: target is LOCKED (%s)\n",
- entry_ndn->bv_val ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_back_attribute: target is LOCKED (%s)\n",
+ entry_ndn->bv_val, 0, 0);
#else
Debug( LDAP_DEBUG_ARGS,
"=> ldbm_back_attribute: target is entry: \"%s\"\n",
/* can we find entry with reader lock */
if ((e = dn2entry_r(be, entry_ndn, NULL )) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
+ LDAP_LOG( BACK_LDBM, INFO,
"ldbm_back_attribute: cannot find entry (%s)\n",
- entry_ndn->bv_val ));
+ entry_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"=> ldbm_back_attribute: cannot find entry: \"%s\"\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_attribute: found entry (%s)\n",
- entry_ndn->bv_val ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_back_attribute: found entry (%s)\n", entry_ndn->bv_val, 0, 0);
#else
Debug( LDAP_DEBUG_ACL,
"=> ldbm_back_attribute: found entry: \"%s\"\n",
if( is_entry_alias( e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_attribute: entry (%s) is an alias\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_attribute: entry (%s) is an alias\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_attribute: entry is an alias\n", 0, 0, 0 );
if( is_entry_referral( e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_attribute: entry (%s) is a referral.\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_attribute: entry (%s) is a referral.\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_attribute: entry is an referral\n", 0, 0, 0 );
if ((attr = attr_find(e->e_attrs, entry_at)) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_attribute: failed to find %s.\n", entry_at_name ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_attribute: failed to find %s.\n", entry_at_name, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_attribute: failed to find %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_back_attribute: rc=%d nvals=%d.\n",
- rc, nvals ));
+ LDAP_LOG( BACK_LDBM, ENTRY,
+ "ldbm_back_attribute: rc=%d nvals=%d.\n", rc, nvals, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_attribute: rc=%d nvals=%d\n",
AttributeDescription *password = slap_schema.si_ad_userPassword;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_back_bind: dn: %s.\n", dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ENTRY,
+ "ldbm_back_bind: dn: %s.\n", dn->bv_val, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "==> ldbm_back_bind: dn: %s\n", dn->bv_val, 0, 0);
#endif
if ( is_entry_alias( e ) ) {
/* entry is an alias, don't allow bind */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_bind: entry (%s) is an alias.\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_bind: entry (%s) is an alias.\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry is alias\n", 0,
0, 0 );
conn, op, e );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_bind: entry(%s) is a referral.\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_bind: entry(%s) is a referral.\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
0, 0 );
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"cache_return_entry_rw: return (%ld):%s, refcnt=%d\n",
- id, rw ? "w" : "r", refcnt ));
+ id, rw ? "w" : "r", refcnt );
#else
Debug( LDAP_DEBUG_TRACE,
"====> cache_return_entry_%s( %ld ): created (%d)\n",
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"cache_return_entry_rw: %ld, delete pending (%d).\n",
- id, refcnt ));
+ id, refcnt, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"====> cache_return_entry_%s( %ld ): delete pending (%d)\n",
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "cache_return_entry_rw: (%ld): deleted (%d)\n",
- id, refcnt ));
+ LDAP_LOG( CACHE, DETAIL1,
+ "cache_return_entry_rw: (%ld): deleted (%d)\n", id, refcnt, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"====> cache_return_entry_%s( %ld ): deleted (%d)\n",
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"cache_return_entry_rw: ID %ld:%s returned (%d)\n",
- id, rw ? "w": "r", refcnt ));
+ id, rw ? "w": "r", refcnt );
#else
Debug( LDAP_DEBUG_TRACE,
"====> cache_return_entry_%s( %ld ): returned (%d)\n",
Entry *ee;
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( CACHE, ENTRY,
"cache_add_entry_rw: add (%s):%s to cache\n",
- e->e_dn, rw ? "w" : "r" ));
+ e->e_dn, rw ? "w" : "r", 0 );
#endif
/* set cache mutex */
ldap_pvt_thread_mutex_lock( &cache->c_mutex );
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ERR,
+ LDAP_LOG( CACHE, ERR,
"cache_add_entry_rw: add (%s):%ld private init failed!\n",
- e->e_dn, e->e_id ));
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"====> cache_add_entry( %ld ): \"%s\": private init failed!\n",
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "cache_add_entry: (%s):%ld already in cache.\n",
- e->e_dn, e->e_id ));
+ LDAP_LOG( CACHE, DETAIL1,
+ "cache_add_entry: (%s):%ld already in cache.\n",
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"====> cache_add_entry( %ld ): \"%s\": already in dn cache\n",
(AVL_CMP) entry_id_cmp, avl_dup_error ) != 0 )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "cache_add_entry: (%s):%ls already in cache.\n",
- e->e_dn, e->e_id ));
+ LDAP_LOG( CACHE, DETAIL1,
+ "cache_add_entry: (%s):%ls already in cache.\n",
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"====> cache_add_entry( %ld ): \"%s\": already in id cache\n",
(AVL_CMP) entry_dn_cmp ) == NULL )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "cache_add_entry: can't delete (%s) from cache.\n",
- e->e_dn ));
+ LDAP_LOG( CACHE, INFO,
+ "cache_add_entry: can't delete (%s) from cache.\n",
+ e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "====> can't delete from dn cache\n",
0, 0, 0 );
(AVL_CMP) entry_dn_cmp, avl_dup_error ) != 0 )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"cache_update_entry: (%s):%ld already in dn cache\n",
- e->e_dn, e->e_id ));
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"====> cache_update_entry( %ld ): \"%s\": already in dn cache\n",
(AVL_CMP) entry_id_cmp, avl_dup_error ) != 0 )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"cache_update_entry: (%s)%ld already in id cache\n",
- e->e_dn, e->e_id ));
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"====> cache_update_entry( %ld ): \"%s\": already in id cache\n",
(AVL_CMP) entry_dn_cmp ) == NULL )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "cache_update_entry: can't delete (%s)%ld from dn cache.\n",
- e->e_dn, e->e_id ));
+ LDAP_LOG( CACHE, INFO,
+ "cache_update_entry: can't delete (%s)%ld from dn cache.\n",
+ e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_ANY, "====> can't delete from dn cache\n",
0, 0, 0 );
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
+ LDAP_LOG( CACHE, INFO,
"cache_find_entry_dn2id: (%s) %ld not ready: %d\n",
- ndn->bv_val, id, state ));
+ ndn->bv_val, id, state );
#else
Debug(LDAP_DEBUG_TRACE,
"====> cache_find_entry_dn2id(\"%s\"): %ld (not ready) %d\n",
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"cache_find_entry_dn2id: (%s): %ld %d tries\n",
- ndn->bv_val, id, count ));
+ ndn->bv_val, id, count );
#else
Debug(LDAP_DEBUG_TRACE,
"====> cache_find_entry_dn2id(\"%s\"): %ld (%d tries)\n",
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
+ LDAP_LOG( CACHE, INFO,
"cache_find_entry_id: (%ld)->%ld not ready (%d).\n",
- id, ep_id, state ));
+ id, ep_id, state );
#else
Debug(LDAP_DEBUG_TRACE,
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"cache_find_entry_id: %ld -> %s found %d tries.\n",
- ep_id, ep->e_dn, count ));
+ ep_id, ep->e_dn, count );
#else
Debug(LDAP_DEBUG_TRACE,
"====> cache_find_entry_id( %ld ) \"%s\" (found) (%d tries)\n",
assert( e->e_private );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
- "cache_delete_entry: delete %ld.\n", e->e_id ));
+ LDAP_LOG( CACHE, ENTRY,
+ "cache_delete_entry: delete %ld.\n", e->e_id, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "====> cache_delete_entry( %ld )\n",
e->e_id, 0, 0 );
ldap_pvt_thread_mutex_lock( &cache->c_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
- "cache_release_all: enter\n" ));
+ LDAP_LOG( CACHE, ENTRY, "cache_release_all: enter\n" , 0, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE, "====> cache_release_all\n", 0, 0, 0 );
#endif
if ( cache->c_cursize ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "cache_release_all: Entry cache could not be emptied.\n" ));
+ LDAP_LOG( CACHE, INFO,
+ "cache_release_all: Entry cache could not be emptied.\n", 0, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE, "Entry-cache could not be emptied\n", 0, 0, 0 );
#endif
ldap_pvt_thread_join( li->li_dbsynctid, (void *) NULL );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "ldbm_back_db_close: ldbm backend syncing\n" ));
+ LDAP_LOG( BACK_LDBM, CRIT,
+ "ldbm_back_db_close: ldbm backend syncing\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldbm backend syncing\n", 0, 0, 0 );
#endif
ldbm_cache_flush_all( be );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "ldbm_back_db_close: ldbm backend synch'ed\n" ));
+ LDAP_LOG( BACK_LDBM, CRIT,
+ "ldbm_back_db_close: ldbm backend synch'ed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldbm backend done syncing\n", 0, 0, 0 );
#endif
conn, op, e );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_compare: entry (%s) is a referral.\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_compare: entry (%s) is a referral.\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
0, 0 );
int i;
if ( argc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "config", LDAP_LEVEL_ERR, "ldbm_back_db_config: %s: "
+ LDAP_LOG ( CONFIG, ERR, "ldbm_back_db_config: %s: "
"line %d: missing frequency value in \"dbsync <frequency> "
- "[<wait-times> [wait-interval]]\" line\n", fname, lineno ));
+ "[<wait-times> [wait-interval]]\" line\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing frquency value in \"dbsync <frequency> [<wait-times> [wait-interval]]\" line\n",
if( i < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "config", LDAP_LEVEL_ERR, "ldbm_back_db_config: %s: "
+ LDAP_LOG ( CONFIG, ERR,
+ "ldbm_back_db_config: %s: "
"line %d: frequency value (%d) invalid \"dbsync "
"<frequency> [<wait-times> [wait-interval]]\" line\n",
- fname, lineno, i ));
+ fname, lineno, i );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: frquency value (%d) invalid \"dbsync <frequency> [<wait-times> [wait-interval]]\" line\n",
i = atoi( argv[2] );
if ( i < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "config",LDAP_LEVEL_ERR, "ldbm_back_db_config: %s: "
+ LDAP_LOG ( CONFIG,ERR, "ldbm_back_db_config: %s: "
"line %d: frequency value (%d) invalid \"dbsync "
"<frequency> [<wait-times> [wait-interval]]\" line\n",
- fname, lineno, i ));
+ fname, lineno, i );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: frquency value (%d) invalid \"dbsync <frequency> [<wait-times> [wait-interval]]\" line\n",
i = atoi( argv[3] );
if ( i <= 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "config",LDAP_LEVEL_ERR, "ldbm_back_db_config: %s: "
+ LDAP_LOG ( CONFIG,ERR, "ldbm_back_db_config: %s: "
"line %d: frequency value (%d) invalid \"dbsync "
"<frequency> [<wait-times> [wait-interval]]\" line\n",
- fname, lineno, i ));
+ fname, lineno, i );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: frquency value (%d) invalid \"dbsync <frequency> [<wait-times> [wait-interval]]\" line\n",
#else
#ifdef NEW_LOGGING
- LDAP_LOG (( "config", LDAP_LEVEL_ERR, "ldbm_back_db_config: \"dbsync\""
- " policies not supported in non-threaded environments\n" ));
+ LDAP_LOG ( CONFIG, ERR, "ldbm_back_db_config: \"dbsync\""
+ " policies not supported in non-threaded environments\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"\"dbsync\" policies not supported in non-threaded environments\n", 0, 0, 0);
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
- "ldbm_cache_open: \"%s\", %d, %o\n", buf, flags, li->li_mode ));
+ LDAP_LOG( CACHE, ENTRY,
+ "ldbm_cache_open: \"%s\", %d, %o\n", buf, flags, li->li_mode );
#else
Debug( LDAP_DEBUG_TRACE, "=> ldbm_cache_open( \"%s\", %d, %o )\n", buf,
flags, li->li_mode );
}
li->li_dbcache[i].dbc_refcnt++;
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "ldbm_cache_open: cache %d\n", i ));
+ LDAP_LOG( CACHE, DETAIL1,
+ "ldbm_cache_open: cache %d\n", i, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= ldbm_cache_open (cache %d)\n", i, 0, 0 );
li->li_dbcache[i].dbc_name = NULL;
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "ldbm_cache_open: no unused db to close - waiting\n" ));
+ LDAP_LOG( CACHE, INFO,
+ "ldbm_cache_open: no unused db to close - waiting\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"ldbm_cache_open no unused db to close - waiting\n",
{
int err = errno;
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ERR,
- "ldbm_cache_open: \"%s\" failed, errono=%d, reason=%s\n",
- buf, err, err > -1 && err < sys_nerr ? sys_errlist[err] :
- "unknown" ));
+ LDAP_LOG( CACHE, ERR,
+ "ldbm_cache_open: \"%s\" failed, errono=%d, reason=%s\n",
+ buf, err, err > -1 && err < sys_nerr ? sys_errlist[err] :
+ "unknown" );
#else
Debug( LDAP_DEBUG_TRACE,
"<= ldbm_cache_open NULL \"%s\" errno=%d reason=\"%s\")\n",
assert( li->li_dbcache[i].dbc_maxindirect < 256 );
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_ARGS,
+ LDAP_LOG( CACHE, ARGS,
"ldbm_cache_open: blksize:%ld maxids:%d maxindirect:%d\n",
li->li_dbcache[i].dbc_blksize, li->li_dbcache[i].dbc_maxids,
- li->li_dbcache[i].dbc_maxindirect ));
+ li->li_dbcache[i].dbc_maxindirect );
#else
Debug( LDAP_DEBUG_ARGS,
"ldbm_cache_open (blksize %ld) (maxids %d) (maxindirect %d)\n",
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
- "<= ldbm_cache_open: (opened %d)\n", i ));
+ LDAP_LOG( CACHE, DETAIL1, "<= ldbm_cache_open: (opened %d)\n", i, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= ldbm_cache_open (opened %d)\n", i, 0, 0 );
#endif
for ( i = 0; i < MAXDBCACHE; i++ ) {
if ( li->li_dbcache[i].dbc_name != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"ldbm_cache_flush_all: flushing db (%s)\n",
- li->li_dbcache[i].dbc_name ));
+ li->li_dbcache[i].dbc_name, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldbm flushing db (%s)\n",
li->li_dbcache[i].dbc_name, 0, 0 );
li->li_dbcache[i].dbc_dirty = 0;
if ( li->li_dbcache[i].dbc_refcnt != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
- "ldbm_cache_flush_all: couldn't close db (%s), refcnt=%d\n",
- li->li_dbcache[i].dbc_name, li->li_dbcache[i].dbc_refcnt ));
+ LDAP_LOG( CACHE, INFO,
+ "ldbm_cache_flush_all: couldn't close db (%s), refcnt=%d\n",
+ li->li_dbcache[i].dbc_name, li->li_dbcache[i].dbc_refcnt,0);
#else
Debug( LDAP_DEBUG_TRACE,
"refcnt = %d, couldn't close db (%s)\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CACHE, DETAIL1,
"ldbm_cache_flush_all: ldbm closing db (%s)\n",
- li->li_dbcache[i].dbc_name ));
+ li->li_dbcache[i].dbc_name, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm closing db (%s)\n",
for ( i = 0; i < MAXDBCACHE; i++ ) {
if ( li->li_dbcache[i].dbc_name != NULL && li->li_dbcache[i].dbc_dirty ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "dbcache", LDAP_LEVEL_DETAIL1, "ldbm_cache_sync: "
- "ldbm syncing db (%s)\n", li->li_dbcache[i].dbc_name ));
+ LDAP_LOG ( CACHE, DETAIL1, "ldbm_cache_sync: "
+ "ldbm syncing db (%s)\n", li->li_dbcache[i].dbc_name, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldbm syncing db (%s)\n",
li->li_dbcache[i].dbc_name, 0, 0 );
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
#ifdef NEW_LOGGING
- LDAP_LOG (( "dbcache", LDAP_LEVEL_ARGS, "ldbm_cache_sync_daemon:"
- " synchronizer starting for %s\n", li->li_directory ));
+ LDAP_LOG ( CACHE, ARGS, "ldbm_cache_sync_daemon:"
+ " synchronizer starting for %s\n", li->li_directory, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "synchronizer starting for %s\n", li->li_directory, 0, 0 );
#endif
while (i && ldap_pvt_thread_pool_backload(&connection_pool) != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "dbcache", LDAP_LEVEL_DETAIL1, "ldbm_cache_sync_daemon:"
- " delay syncing %s\n", li->li_directory ));
+ LDAP_LOG ( CACHE, DETAIL1, "ldbm_cache_sync_daemon:"
+ " delay syncing %s\n", li->li_directory, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "delay syncing %s\n", li->li_directory, 0, 0 );
#endif
if (!li->li_dbshutdown) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "dbcache", LDAP_LEVEL_DETAIL1, "ldbm_cache_sync_daemon:"
- " syncing %s\n", li->li_directory ));
+ LDAP_LOG ( CACHE, DETAIL1, "ldbm_cache_sync_daemon:"
+ " syncing %s\n", li->li_directory, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "syncing %s\n", li->li_directory, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "dbcache", LDAP_LEVEL_DETAIL1, "ldbm_cache_sync_daemon:"
- " synchronizer stopping\n" ));
+ LDAP_LOG ( CACHE, DETAIL1, "ldbm_cache_sync_daemon:"
+ " synchronizer stopping\n", 0, 0, 0);
#else
Debug( LDAP_DEBUG_ANY, "synchronizer stopping\n", 0, 0, 0 );
#endif
AttributeDescription *children = slap_schema.si_ad_children;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_back_delete: %s\n", dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_back_delete: %s\n", dn->bv_val, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "==> ldbm_back_delete: %s\n", dn->bv_val, 0, 0);
#endif
BerVarray refs;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_delete: no such object %s\n", dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_delete: no such object %s\n", dn->bv_val, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "<=- ldbm_back_delete: no such object %s\n",
dn->bv_val, 0, 0);
conn, op, e );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_delete: entry (%s) is a referral.\n",
- e->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_delete: entry (%s) is a referral.\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
0, 0 );
if ( has_children( be, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_delete: (%s) is a non-leaf node.\n", dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_delete: (%s) is a non-leaf node.\n", dn->bv_val, 0,0);
#else
Debug(LDAP_DEBUG_ARGS, "<=- ldbm_back_delete: non leaf %s\n",
dn->bv_val, 0, 0);
pdn.bv_len) ) {
if( (p = dn2entry_w( be, &pdn, NULL )) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_delete: parent of (%s) does not exist\n", dn ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_delete: parent of (%s) does not exist\n", dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- ldbm_back_delete: parent does not exist\n",
children, NULL, ACL_WRITE, NULL ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_delete: no access to parent of (%s)\n",
- dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_delete: no access to parent of (%s)\n",
+ dn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- ldbm_back_delete: no access to parent\n", 0,
/* check parent for "children" acl */
if ( ! rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+ LDAP_LOG( BACK_LDBM, ERR,
"ldbm_back_delete: no access "
- "to parent of ("")\n" ));
+ "to parent of ("")\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- ldbm_back_delete: no "
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+ LDAP_LOG( BACK_LDBM, ERR,
"ldbm_back_delete: (%s) has no "
- "parent & not a root.\n", dn ));
+ "parent & not a root.\n", dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- ldbm_back_delete: no parent & "
/* delete from dn2id mapping */
if ( dn2id_delete( be, &e->e_nname, e->e_id ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_delete: (%s) operations error\n",
- dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_delete: (%s) operations error\n", dn->bv_val, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS,
"<=- ldbm_back_delete: operations error %s\n",
/* delete from disk and cache */
if ( id2entry_delete( be, e ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_delete: (%s) operations error\n",
- dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_delete: (%s) operations error\n", dn->bv_val, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS,
"<=- ldbm_back_delete: operations error %s\n",
struct berval ptr, pdn;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "dn2id_add: (%s):%ld\n", dn->bv_val, id ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "dn2id_add: (%s):%ld\n", dn->bv_val, id, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> dn2id_add( \"%s\", %ld )\n", dn->bv_val, id, 0 );
#endif
if ( (db = ldbm_cache_open( be, "dn2id", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "dn2id_add: couldn't open/create dn2id%s\n", LDBM_SUFFIX ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "dn2id_add: couldn't open/create dn2id%s\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not open/create dn2id%s\n",
LDBM_SUFFIX, 0, 0 );
ldbm_cache_close( be, db );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "dn2id_add: return %d\n", rc ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "dn2id_add: return %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= dn2id_add %d\n", rc, 0, 0 );
#endif
Datum key, data;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "dn2id: (%s)\n", dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "dn2id: (%s)\n", dn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> dn2id( \"%s\" )\n", dn->bv_val, 0, 0 );
#endif
/* first check the cache */
if ( (*idp = cache_find_entry_ndn2id( be, &li->li_cache, dn )) != NOID ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "dn2id: (%s)%ld in cache.\n", dn, *idp ));
+ LDAP_LOG( BACK_LDBM, DETAIL1, "dn2id: (%s)%ld in cache.\n", dn, *idp, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= dn2id %ld (in cache)\n", *idp,
0, 0 );
if ( (db = ldbm_cache_open( be, "dn2id", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "dn2id: couldn't open dn2id%s\n", LDBM_SUFFIX ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "dn2id: couldn't open dn2id%s\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "<= dn2id could not open dn2id%s\n",
LDBM_SUFFIX, 0, 0 );
if ( data.dptr == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "dn2id: (%s) NOID\n", dn ));
+ LDAP_LOG( BACK_LDBM, INFO, "dn2id: (%s) NOID\n", dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= dn2id NOID\n", 0, 0, 0 );
#endif
ldbm_datum_free( db->dbc_db, data );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "dn2id: %ld\n", *idp ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "dn2id: %ld\n", *idp, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= dn2id %ld\n", *idp, 0, 0 );
#endif
Datum key;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "dn2idl: \"%c%s\"\n", prefix, dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "dn2idl: \"%c%s\"\n", prefix, dn->bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> dn2idl( \"%c%s\" )\n", prefix, dn->bv_val, 0 );
#endif
if ( (db = ldbm_cache_open( be, "dn2id", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "dn2idl: could not open dn2id%s\n", LDBM_SUFFIX ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "dn2idl: could not open dn2id%s\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "<= dn2idl could not open dn2id%s\n",
LDBM_SUFFIX, 0, 0 );
struct berval ptr, pdn;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "dn2id_delete: (%s)%ld\n", dn->bv_val, id ));
+ LDAP_LOG( BACK_LDBM, ENTRY,
+ "dn2id_delete: (%s)%ld\n", dn->bv_val, id, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> dn2id_delete( \"%s\", %ld )\n", dn->bv_val, id, 0 );
#endif
if ( (db = ldbm_cache_open( be, "dn2id", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "dn2id_delete: couldn't open db2id%s\n", LDBM_SUFFIX ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "dn2id_delete: couldn't open db2id%s\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= dn2id_delete could not open dn2id%s\n", LDBM_SUFFIX,
ldbm_cache_close( be, db );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "dn2id_delete: return %d\n", rc ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "dn2id_delete: return %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= dn2id_delete %d\n", rc, 0, 0 );
#endif
struct berval pdn;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "dn2entry_rw: %s entry %s\n", rw ? "w" : "r",
- dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ENTRY,
+ "dn2entry_rw: %s entry %s\n", rw ? "w" : "r", dn->bv_val, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "dn2entry_%s: dn: \"%s\"\n",
rw ? "w" : "r", dn->bv_val, 0);
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "dn2entry_rw: no entry for valid id (%ld), dn (%s)\n",
- id, dn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "dn2entry_rw: no entry for valid id (%ld), dn (%s)\n",
+ id, dn->bv_val, 0 );
#else
Debug(LDAP_DEBUG_ANY,
"dn2entry_%s: no entry for valid id (%ld), dn \"%s\"\n",
ID_BLOCK *result;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY, "filter_candidates: enter\n"));
+ LDAP_LOG( FILTER, ENTRY, "filter_candidates: enter\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> filter_candidates\n", 0, 0, 0 );
#endif
switch ( f->f_choice ) {
case SLAPD_FILTER_DN_ONE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "filter_candidates: DN ONE (%s)\n", f->f_dn ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "filter_candidates: DN ONE (%s)\n", f->f_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tDN ONE\n", 0, 0, 0 );
#endif
case SLAPD_FILTER_DN_SUBTREE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "filter_candidates: DN SUBTREE (%s)\n", f->f_dn ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "filter_candidates: DN SUBTREE (%s)\n", f->f_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tDN SUBTREE\n", 0, 0, 0 );
#endif
case LDAP_FILTER_PRESENT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "filter_candidates: Present (%s)\n", f->f_desc->ad_cname.bv_val ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "filter_candidates: Present (%s)\n",
+ f->f_desc->ad_cname.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tPRESENT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_EQUALITY:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( FILTER, DETAIL1,
"filter_candidates: EQUALITY (%s),(%s)\n",
f->f_ava->aa_desc->ad_cname.bv_val,
- f->f_ava->aa_value.bv_val ));
+ f->f_ava->aa_value.bv_val, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tEQUALITY\n", 0, 0, 0 );
#endif
case LDAP_FILTER_APPROX:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( FILTER, DETAIL1,
"filter_candidates: APPROX (%s), (%s)\n",
f->f_ava->aa_desc->ad_cname.bv_val,
- f->f_ava->aa_value.bv_val ));
+ f->f_ava->aa_value.bv_val, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tAPPROX\n", 0, 0, 0 );
#endif
case LDAP_FILTER_SUBSTRINGS:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "filter_candidates: SUBSTRINGS\n"));
+ LDAP_LOG( FILTER, DETAIL1,
+ "filter_candidates: SUBSTRINGS\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tSUBSTRINGS\n", 0, 0, 0 );
#endif
case LDAP_FILTER_GE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "filter_candidates: GE\n"));
+ LDAP_LOG( FILTER, DETAIL1, "filter_candidates: GE\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tGE\n", 0, 0, 0 );
#endif
case LDAP_FILTER_LE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "filter_candidates: LE\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "filter_candidates: LE\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tLE\n", 0, 0, 0 );
#endif
case LDAP_FILTER_AND:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "filter_candidates: AND\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "filter_candidates: AND\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tAND\n", 0, 0, 0 );
#endif
case LDAP_FILTER_OR:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "filter_candidates: OR\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "filter_candidates: OR\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tOR\n", 0, 0, 0 );
#endif
case LDAP_FILTER_NOT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "filter_candidates: NOT\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "filter_candidates: NOT\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tNOT\n", 0, 0, 0 );
#endif
break;
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "filter_candidates: UNKNOWN\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "filter_candidates: UNKNOWN\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "\tUNKNOWN\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "filter_candidates: return %ld\n",
- result ? ID_BLOCK_NIDS(result) : 0 ));
+ LDAP_LOG( FILTER, ENTRY,
+ "filter_candidates: return %ld\n",
+ result ? ID_BLOCK_NIDS(result) : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= filter_candidates %ld\n",
result ? ID_BLOCK_NIDS(result) : 0, 0, 0 );
struct berval prefix = {0};
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "presence_candidates: enter\n" ));
+ LDAP_LOG( FILTER, ENTRY, "presence_candidates: enter\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> presence_candidates\n", 0, 0, 0 );
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "presence_candidates: index_param returned %d\n",
- rc ));
+ LDAP_LOG( FILTER, INFO,
+ "presence_candidates: index_param returned %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= presence_candidates: index_param returned=%d\n",
if( dbname == NULL ) {
/* not indexed */
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "presence_candidates: not indexed\n" ));
+ LDAP_LOG( FILTER, INFO, "presence_candidates: not indexed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= presense_candidates: not indexed\n",
if ( db == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
+ LDAP_LOG( FILTER, INFO,
"presence_candidates: db open failed (%s%s)\n",
- dbname, LDBM_SUFFIX ));
+ dbname, LDBM_SUFFIX, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= presense_candidates db open failed (%s%s)\n",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "presence_candidates: key read failed (%d)\n", rc ));
+ LDAP_LOG( FILTER, ERR,
+ "presence_candidates: key read failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= presense_candidates key read failed (%d)\n",
} else if( idl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "presence_candidates: NULL\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "presence_candidates: NULL\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= presense_candidates NULL\n",
ldbm_cache_close( be, db );
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "presence_candidates: return %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0 ));
+ LDAP_LOG( FILTER, ENTRY,
+ "presence_candidates: return %ld\n",
+ idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= presence_candidates %ld\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
MatchingRule *mr;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "equality_candidates: enter\n" ));
+ LDAP_LOG( FILTER, ENTRY, "equality_candidates: enter\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> equality_candidates\n", 0, 0, 0 );
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "equality_candidates: index_param returned %d\n", rc ));
+ LDAP_LOG( FILTER, ERR,
+ "equality_candidates: index_param returned %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= equality_candidates: index_param returned=%d\n",
if( dbname == NULL ) {
/* not indexed */
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "equality_candidates: not indexed\n" ));
+ LDAP_LOG( FILTER, ERR, "equality_candidates: not indexed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= equality_candidates: not indexed\n",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ LDAP_LOG( FILTER, ERR,
"equality_candidates: (%s%s) MR filter failed (%d\n",
- dbname, LDBM_SUFFIX, rc ));
+ dbname, LDBM_SUFFIX, rc );
#else
Debug( LDAP_DEBUG_TRACE,
"<= equality_candidates: (%s%s) MR filter failed (%d)\n",
if( keys == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "equality_candidates: no keys (%s%s)\n",
- dbname, LDBM_SUFFIX ));
+ LDAP_LOG( FILTER, ERR,
+ "equality_candidates: no keys (%s%s)\n", dbname, LDBM_SUFFIX, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= equality_candidates: no keys (%s%s)\n",
if ( db == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "equality_candidates: db open failed (%s%s)\n",
- dbname, LDBM_SUFFIX ));
+ LDAP_LOG( FILTER, ERR, "equality_candidates: db open failed (%s%s)\n",
+ dbname, LDBM_SUFFIX, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= equality_candidates db open failed (%s%s)\n",
idl_free( idl );
idl = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "equality_candidates: key read failed (%d)\n", rc ));
+ LDAP_LOG( FILTER, ERR,
+ "equality_candidates: key read failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= equality_candidates key read failed (%d)\n",
idl_free( idl );
idl = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "equality_candidates NULL\n" ));
+ LDAP_LOG( FILTER, INFO, "equality_candidates NULL\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= equality_candidates NULL\n",
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "equality_candidates: return %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0 ));
+ LDAP_LOG( FILTER, ENTRY,
+ "equality_candidates: return %ld\n",
+ idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= equality_candidates %ld\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
MatchingRule *mr;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "approx_candidates: enter\n" ));
+ LDAP_LOG( FILTER, ENTRY, "approx_candidates: enter\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> approx_candidates\n", 0, 0, 0 );
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "approx_candidates: index_param returned %d\n", rc ));
+ LDAP_LOG( FILTER, ERR,
+ "approx_candidates: index_param returned %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= approx_candidates: index_param returned=%d\n",
if( dbname == NULL ) {
/* not indexed */
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "approx_candidates: not indexed\n" ));
+ LDAP_LOG( FILTER, ERR, "approx_candidates: not indexed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= approx_candidates: not indexed\n",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ LDAP_LOG( FILTER, ERR,
"approx_candidates: (%s%s) MR filter failed (%d)\n",
- dbname, LDBM_SUFFIX, rc ));
+ dbname, LDBM_SUFFIX, rc );
#else
Debug( LDAP_DEBUG_TRACE,
"<= approx_candidates: (%s%s) MR filter failed (%d)\n",
if( keys == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
+ LDAP_LOG( FILTER, INFO,
"approx_candidates: no keys (%s%s)\n",
- dbname, LDBM_SUFFIX ));
+ dbname, LDBM_SUFFIX, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= approx_candidates: no keys (%s%s)\n",
if ( db == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "approx_candidates db open failed (%s%s)\n",
- dbname, LDBM_SUFFIX ));
+ LDAP_LOG( FILTER, ERR,
+ "approx_candidates db open failed (%s%s)\n",
+ dbname, LDBM_SUFFIX, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= approx_candidates db open failed (%s%s)\n",
idl_free( idl );
idl = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "approx_candidates: key read failed (%d)\n", rc ));
+ LDAP_LOG( FILTER, ERR,
+ "approx_candidates: key read failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= approx_candidates key read failed (%d)\n",
rc, 0, 0 );
idl_free( idl );
idl = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "approx_candidates: NULL\n" ));
+ LDAP_LOG( FILTER, INFO, "approx_candidates: NULL\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= approx_candidates NULL\n",
0, 0, 0 );
ldbm_cache_close( be, db );
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "approx_candidates: return %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0 ));
+ LDAP_LOG( FILTER, ENTRY,
+ "approx_candidates: return %ld\n",
+ idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= approx_candidates %ld\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
Filter *f;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "list_candidates: 0x%x\n", ftype ));
+ LDAP_LOG( FILTER, ENTRY, "list_candidates: 0x%x\n", ftype, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> list_candidates 0x%x\n", ftype, 0, 0 );
#endif
if ( (tmp = filter_candidates( be, f )) == NULL &&
ftype == LDAP_FILTER_AND ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "list_candidates: NULL\n" ));
+ LDAP_LOG( FILTER, INFO, "list_candidates: NULL\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= list_candidates NULL\n", 0, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "list_candidates: return %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0 ));
+ LDAP_LOG( FILTER, ENTRY, "list_candidates: return %ld\n",
+ idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= list_candidates %ld\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
MatchingRule *mr;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "substrings_candidates: enter\n" ));
+ LDAP_LOG( FILTER, ENTRY, "substrings_candidates: enter\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> substrings_candidates\n", 0, 0, 0 );
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "substrings_candidates: index_param returned %d\n", rc ));
+ LDAP_LOG( FILTER, ERR,
+ "substrings_candidates: index_param returned %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= substrings_candidates: index_param returned=%d\n",
if( dbname == NULL ) {
/* not indexed */
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "substrings_candidates: not indexed\n" ));
+ LDAP_LOG( FILTER, ERR, "substrings_candidates: not indexed\n", 0, 0, 0);
#else
Debug( LDAP_DEBUG_ANY,
"<= substrings_candidates: not indexed\n",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ LDAP_LOG( FILTER, ERR,
"substrings_candidates: (%s%s) MR filter failed (%d)\n",
- dbname, LDBM_SUFFIX, rc ));
+ dbname, LDBM_SUFFIX, rc );
#else
Debug( LDAP_DEBUG_TRACE,
"<= substrings_candidates: (%s%s) MR filter failed (%d)\n",
if( keys == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ LDAP_LOG( FILTER, ERR,
"substrings_candidates: (0x%04lx) no keys (%s%s)\n",
- mask, dbname, LDBM_SUFFIX ));
+ mask, dbname, LDBM_SUFFIX );
#else
Debug( LDAP_DEBUG_TRACE,
"<= substrings_candidates: (0x%04lx) no keys (%s%s)\n",
if ( db == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ LDAP_LOG( FILTER, ERR,
"substrings_candidates: db open failed (%s%s)\n",
- dbname, LDBM_SUFFIX ));
+ dbname, LDBM_SUFFIX, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= substrings_candidates db open failed (%s%s)\n",
idl_free( idl );
idl = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "substrings_candidates: key read failed (%d)\n",
- rc ));
+ LDAP_LOG( FILTER, ERR,
+ "substrings_candidates: key read failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= substrings_candidates key read failed (%d)\n",
rc, 0, 0 );
idl_free( idl );
idl = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "substrings_candidates: NULL\n" ));
+ LDAP_LOG( FILTER, INFO, "substrings_candidates: NULL\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= substrings_candidates NULL\n",
0, 0, 0 );
ldbm_cache_close( be, db );
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( FILTER, ENTRY,
"substrings_candidates: return %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0 ));
+ idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= substrings_candidates %ld\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( BACK_LDBM, ENTRY,
"ldbm_back_group: check (%s) member of (%s), oc %s\n",
- op_ndn->bv_val, gr_ndn->bv_val, group_oc_name ));
+ op_ndn->bv_val, gr_ndn->bv_val, group_oc_name );
#else
Debug( LDAP_DEBUG_ARGS,
"=> ldbm_back_group: gr dn: \"%s\"\n",
/* we already have a LOCKED copy of the entry */
e = target;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_group: target is group (%s)\n",
- gr_ndn->bv_val ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_back_group: target is group (%s)\n", gr_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"=> ldbm_back_group: target is group: \"%s\"\n",
/* can we find group entry with reader lock */
if ((e = dn2entry_r(be, gr_ndn, NULL )) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_group: cannot find group (%s)\n",
- gr_ndn->bv_val ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_back_group: cannot find group (%s)\n",
+ gr_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"=> ldbm_back_group: cannot find group: \"%s\"\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_group: found group (%s)\n", gr_ndn->bv_val ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_back_group: found group (%s)\n", gr_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"=> ldbm_back_group: found group: \"%s\"\n",
if( is_entry_alias( e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_group: group (%s) is an alias\n",
- gr_ndn->bv_val ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_group: group (%s) is an alias\n", gr_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_group: group is an alias\n", 0, 0, 0 );
if( is_entry_referral( e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_group: group (%s) is a referral.\n",
- gr_ndn->bv_val ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_group: group (%s) is a referral.\n", gr_ndn->bv_val,0,0);
#else
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_group: group is an referral\n", 0, 0, 0 );
if( !is_entry_objectclass( e, group_oc, 0 ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+ LDAP_LOG( BACK_LDBM, ERR,
"ldbm_back_group: failed to find %s in objectClass.\n",
- group_oc_name ));
+ group_oc_name, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_group: failed to find %s in objectClass\n",
if ((attr = attr_find(e->e_attrs, group_at)) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_group: failed to find %s\n", group_at_name ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_group: failed to find %s\n", group_at_name, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_group: failed to find %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( BACK_LDBM, ENTRY,
"ldbm_back_group: found objectClass %s and %s\n",
- group_oc_name, group_at_name ));
+ group_oc_name, group_at_name, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_group: found objectClass %s and %s\n",
if( value_find( group_at, attr->a_vals, op_ndn ) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BACK_LDBM, DETAIL1,
"ldbm_back_group: \"%s\" not in \"%s\": %s\n",
- op_ndn->bv_val, gr_ndn->bv_val, group_at_name ));
+ op_ndn->bv_val, gr_ndn->bv_val, group_at_name );
#else
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_group: \"%s\" not in \"%s\": %s\n",
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BACK_LDBM, DETAIL1,
"ldbm_back_group: %s is in %s: %s\n",
- op_ndn->bv_val, gr_ndn->bv_val, group_at_name ));
+ op_ndn->bv_val, gr_ndn->bv_val, group_at_name );
#else
Debug( LDAP_DEBUG_ACL,
"<= ldbm_back_group: \"%s\" is in \"%s\": %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_back_group: rc=%d\n", rc ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_back_group: rc=%d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldbm_back_group: rc=%d\n", rc, 0, 0 );
#endif
#include "slap.h"
#include "back-ldbm.h"
-
int
has_children(
Backend *be,
ldbm_datum_init( key );
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2children", LDAP_LEVEL_ENTRY,
- "has_children: enter %ld\n", p->e_id ));
+ LDAP_LOG( INDEX, ENTRY, "has_children: enter %ld\n", p->e_id, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> has_children( %ld )\n", p->e_id , 0, 0 );
#endif
if ( (db = ldbm_cache_open( be, "dn2id", LDBM_SUFFIX,
LDBM_WRCREAT )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2children", LDAP_LEVEL_ERR,
- "has_children: could not open \"dn2id%s\"\n",
- LDBM_SUFFIX ));
+ LDAP_LOG( INDEX, ERR,
+ "has_children: could not open \"dn2id%s\"\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= has_children -1 could not open \"dn2id%s\"\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2children", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( INDEX, ENTRY,
"has_children: id (%ld) %s children.\n",
- p->e_id, rc ? "has" : "doesn't have" ));
+ p->e_id, rc ? "has" : "doesn't have", 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= has_children( %ld ): %s\n",
p->e_id, rc ? "yes" : "no", 0 );
ldbm_datum_init( data );
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
- "id2entry_add: (%s)%ld\n", e->e_dn, e->e_id ));
+ LDAP_LOG( INDEX, ENTRY, "id2entry_add: (%s)%ld\n", e->e_dn, e->e_id, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> id2entry_add( %ld, \"%s\" )\n", e->e_id,
e->e_dn, 0 );
if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
- "id2entry_add: could not open/create id2entry%s\n",
- LDBM_SUFFIX ));
+ LDAP_LOG( INDEX, ERR,
+ "id2entry_add: could not open/create id2entry%s\n",
+ LDBM_SUFFIX, 0,0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not open/create id2entry%s\n",
LDBM_SUFFIX, 0, 0 );
ldbm_cache_close( be, db );
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
- "id2entry_add: return %d\n", rc ));
+ LDAP_LOG( INDEX, ENTRY, "id2entry_add: return %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= id2entry_add %d\n", rc, 0, 0 );
#endif
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
- "id2entry_delete: (%s)%ld\n", e->e_dn, e->e_id ));
+ LDAP_LOG( INDEX, ENTRY, "id2entry_delete: (%s)%ld\n", e->e_dn, e->e_id, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "=> id2entry_delete( %ld, \"%s\" )\n", e->e_id,
e->e_dn, 0 );
if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
+ LDAP_LOG( INDEX, ERR,
"id2entry_delete: could not open/create id2entry%s\n",
- LDBM_SUFFIX ));
+ LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not open/create id2entry%s\n",
LDBM_SUFFIX, 0, 0 );
if ( cache_delete_entry( &li->li_cache, e ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
+ LDAP_LOG( INDEX, ERR,
"id2entry_delete: Could not delete (%s)%ld from cache\n",
- e->e_dn, e->e_id ));
+ e->e_dn, e->e_id, 0 );
#else
Debug(LDAP_DEBUG_ANY, "could not delete %ld (%s) from cache\n",
e->e_id, e->e_dn, 0 );
ldbm_cache_close( be, db );
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
- "id2entry_delete: return %d\n", rc ));
+ LDAP_LOG( INDEX, ENTRY, "id2entry_delete: return %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= id2entry_delete %d\n", rc, 0, 0 );
#endif
ldbm_datum_init( data );
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
- "id2entry_rw: %s (%ld)\n",
- rw ? "write" : "read", id ));
+ LDAP_LOG( INDEX, ENTRY,
+ "id2entry_rw: %s (%ld)\n", rw ? "write" : "read", id, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> id2entry_%s( %ld )\n",
rw ? "w" : "r", id, 0 );
if ( (e = cache_find_entry_id( &li->li_cache, id, rw )) != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( INDEX, DETAIL1,
"id2entry_rw: %s (%ld) 0x%lx (cache).\n",
- rw ? "write" : "read", id, (unsigned long)e ));
+ rw ? "write" : "read", id, (unsigned long)e );
#else
Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) 0x%lx (cache)\n",
rw ? "w" : "r", id, (unsigned long) e );
if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
- "id2entry_rw: could not open id2entry%s\n", LDBM_SUFFIX ));
+ LDAP_LOG( INDEX, ERR,
+ "id2entry_rw: could not open id2entry%s\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not open id2entry%s\n",
LDBM_SUFFIX, 0, 0 );
if ( data.dptr == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
- "id2entry_rw: (%ld) not found\n", id ));
+ LDAP_LOG( INDEX, ERR,
+ "id2entry_rw: (%ld) not found\n", id, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) not found\n",
rw ? "w" : "r", id, 0 );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
- "id2entry_rw: %s of %ld failed\n",
- rw ? "write" : "read", id ));
+ LDAP_LOG( INDEX, ERR,
+ "id2entry_rw: %s of %ld failed\n", rw ? "write" : "read", id, 0);
#else
Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) (failed)\n",
rw ? "w" : "r", id, 0 );
*/
if ( (e = cache_find_entry_id( &li->li_cache, id, rw )) != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( INDEX, DETAIL1,
"id2entry_rw: %s of %ld 0x%lx (cache)\n",
- rw ? "write" : "read", id, (unsigned long)e ));
+ rw ? "write" : "read", id, (unsigned long)e );
#else
Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) 0x%lx (cache)\n",
rw ? "w" : "r", id, (unsigned long) e );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
+ LDAP_LOG( INDEX, ERR,
"id2entry_rw: %s of %ld (cache add failed)\n",
- rw ? "write" : "read", id ));
+ rw ? "write" : "read", id, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) (cache add failed)\n",
rw ? "w" : "r", id, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( INDEX, ENTRY,
"id2entry_rw: %s of %ld 0x%lx (disk)\n",
- rw ? "write" : "read", id, (unsigned long)e ));
+ rw ? "write" : "read", id, (unsigned long)e );
#else
Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) 0x%lx (disk)\n",
rw ? "w" : "r", id, (unsigned long) e );
{
if ( idl == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
- "idl_free: called with NULL pointer\n" ));
+ LDAP_LOG( INDEX, INFO, "idl_free: called with NULL pointer\n" , 0,0,0);
#else
Debug( LDAP_DEBUG_TRACE,
"idl_free: called with NULL pointer\n",
if ( (tmp[i] = idl_fetch_one( be, db, data )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
- "idl_fetch: idl_fetch_one returned NULL\n" ));
+ LDAP_LOG( INDEX, INFO,
+ "idl_fetch: idl_fetch_one returned NULL\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_ANY,
"idl_fetch: one returned NULL\n", 0, 0, 0 );
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( INDEX, ENTRY,
"idl_fetch: %ld ids (%ld max)\n",
- ID_BLOCK_NIDS(idl), ID_BLOCK_NMAXN(idl) ));
+ ID_BLOCK_NIDS(idl), ID_BLOCK_NMAXN(idl), 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= idl_fetch %ld ids (%ld max)\n",
ID_BLOCK_NIDS(idl), ID_BLOCK_NMAXN(idl), 0 );
/* delete old key block */
if ( (rc = ldbm_cache_delete( db, bkey )) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
- "idl_change_first: ldbm_cache_delete returned %d\n", rc ));
+ LDAP_LOG( INDEX, INFO,
+ "idl_change_first: ldbm_cache_delete returned %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"idl_change_first: ldbm_cache_delete returned %d\n",
if ( (rc = idl_store( be, db, bkey, b )) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
- "idl_change_first: idl_store returned %d\n", rc ));
+ LDAP_LOG( INDEX, INFO,
+ "idl_change_first: idl_store returned %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"idl_change_first: idl_store returned %d\n", rc, 0, 0 );
ID_BLOCK_ID(h, pos) = ID_BLOCK_ID(b, 0);
if ( (rc = idl_store( be, db, hkey, h )) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
- "idl_change_first: idl_store returned %s\n", rc ));
+ LDAP_LOG( INDEX, INFO,
+ "idl_change_first: idl_store returned %s\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"idl_change_first: idl_store returned %d\n", rc, 0, 0 );
if ( (tmp = idl_fetch_one( be, db, k2 )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR,
- "idl_insert_key: nonexistent continuation block\n" ));
+ LDAP_LOG( INDEX, ERR,
+ "idl_insert_key: nonexistent continuation block\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "idl_insert_key: nonexistent continuation block\n",
0, 0, 0 );
case 0: /* id inserted ok */
if ( (rc = idl_store( be, db, k2, tmp )) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR,
- "ids_insert_key: idl_store returned %d\n", rc ));
+ LDAP_LOG( INDEX, ERR,
+ "ids_insert_key: idl_store returned %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"idl_insert_key: idl_store returned %d\n", rc, 0, 0 );
cont_id( &k2, ID_BLOCK_ID(idl, i) );
if ( (tmp2 = idl_fetch_one( be, db, k2 )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR,
- "idl_insert_key: idl_fetch_one returned NULL\n"));
+ LDAP_LOG( INDEX, ERR,
+ "idl_insert_key: idl_fetch_one returned NULL\n", 0, 0, 0);
#else
Debug( LDAP_DEBUG_ANY,
"idl_insert_key: idl_fetch_one returned NULL\n",
if ( (rc = idl_store( be, db, k2, tmp )) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_ERR,
- "idl_insert_key: idl_store returned %d\n", rc ));
+ LDAP_LOG( INDEX, ERR,
+ "idl_insert_key: idl_store returned %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"idl_insert_key: idl_store returned %d\n", rc, 0, 0 );
*/
if ( rc == 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
+ LDAP_LOG( INDEX, INFO,
"idl_insert_key: id %ld is already in next block\n",
- id ));
+ id, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"idl_insert_key: id %ld already in next block\n",
if ( (tmp = idl_fetch_one( be, db, data )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
- "idl_delete_key: idl_fetch_one returned NULL\n" ));
+ LDAP_LOG( INDEX, INFO,
+ "idl_delete_key: idl_fetch_one returned NULL\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"idl_delete_key: idl_fetch of returned NULL\n", 0, 0, 0 );
if ( db == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ERR,
- "index_read: Could not open db %s%s\n",
- dbname, LDBM_SUFFIX ));
+ LDAP_LOG( INDEX, ERR,
+ "index_read: Could not open db %s%s\n", dbname, LDBM_SUFFIX, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= index_read NULL (could not open %s%s)\n",
Attribute *ap )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "index_entry: %s (%s)%ld\n",
- op == SLAP_INDEX_ADD_OP ? "add" : "del",
- e->e_dn, e->e_id ));
+ LDAP_LOG( INDEX, ENTRY,
+ "index_entry: %s (%s)%ld\n", op == SLAP_INDEX_ADD_OP ? "add" : "del",
+ e->e_dn, e->e_id );
#else
Debug( LDAP_DEBUG_TRACE, "=> index_entry_%s( %ld, \"%s\" )\n",
op == SLAP_INDEX_ADD_OP ? "add" : "del",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "index_entry: success\n" ));
+ LDAP_LOG( INDEX, ENTRY, "index_entry: success\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= index_entry_%s( %ld, \"%s\" ) success\n",
op == SLAP_INDEX_ADD_OP ? "add" : "del",
if ( rc != 0 )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "init", LDAP_LEVEL_ERR, "ldbm_back_db_open: sync "
- "ldap_pvt_thread_create failed (%d)\n", rc ));
+ LDAP_LOG ( BACK_LDBM, ERR, "ldbm_back_db_open: sync "
+ "ldap_pvt_thread_create failed (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"sync ldap_pvt_thread_create failed (%d)\n", rc, 0, 0 );
ID_BLOCK *idl;
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "key_read: enter\n" ));
+ LDAP_LOG( INDEX, ENTRY, "key_read: enter\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> key_read\n", 0, 0, 0 );
#endif
idl = idl_fetch( be, db, key );
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "key_read: %ld candidates\n",
- idl ? ID_BLOCK_NIDS(idl) : 0 ));
+ LDAP_LOG( INDEX, ENTRY,
+ "key_read: %ld candidates\n", idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= index_read %ld candidates\n",
idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
Datum key;
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "key_change: %s ID %lx\n",
- op == SLAP_INDEX_ADD_OP ? "Add" : "Delete", (long)id ));
+ LDAP_LOG( INDEX, ENTRY, "key_change: %s ID %lx\n",
+ op == SLAP_INDEX_ADD_OP ? "Add" : "Delete", (long)id, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> key_change(%s,%lx)\n",
op == SLAP_INDEX_ADD_OP ? "ADD":"DELETE", (long) id, 0 );
#ifdef NEW_LOGGING
- LDAP_LOG(( "index", LDAP_LEVEL_ENTRY,
- "key_change: return %d\n", rc ));
+ LDAP_LOG( INDEX, ENTRY, "key_change: return %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= key_change %d\n", rc, 0, 0 );
#endif
Attribute *ap;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_modify_internal: %s\n", dn ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_modify_internal: %s\n", dn, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "ldbm_modify_internal: %s\n", dn, 0, 0);
#endif
switch ( mod->sm_op ) {
case LDAP_MOD_ADD:
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_modify_internal: add\n" ));
+ LDAP_LOG( BACK_LDBM, DETAIL1, "ldbm_modify_internal: add\n", 0, 0, 0);
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: add\n", 0, 0, 0);
#endif
rc = modify_add_values( e, mod, text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_modify_internal: failed %d (%s)\n",
- rc, *text ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_modify_internal: failed %d (%s)\n", rc, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
rc, *text, 0);
case LDAP_MOD_DELETE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_modify_internal: delete\n" ));
+ LDAP_LOG( BACK_LDBM, DETAIL1, "ldbm_modify_internal: delete\n", 0,0,0);
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: delete\n", 0, 0, 0);
#endif
assert( rc != LDAP_TYPE_OR_VALUE_EXISTS );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_modify_internal: failed %d (%s)\n", rc, *text ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_modify_internal: failed %d (%s)\n", rc, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
rc, *text, 0);
case LDAP_MOD_REPLACE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_modify_internal: replace\n" ));
+ LDAP_LOG( BACK_LDBM, DETAIL1, "ldbm_modify_internal: replace\n",0,0,0);
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: replace\n", 0, 0, 0);
#endif
rc = modify_replace_values( e, mod, text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_modify_internal: failed %d (%s)\n", rc, *text ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_modify_internal: failed %d (%s)\n", rc, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
rc, *text, 0);
case SLAP_MOD_SOFTADD:
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_modify_internal: softadd\n" ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_modify_internal: softadd\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: softadd\n", 0, 0, 0);
#endif
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_modify_internal: failed %d (%s)\n", rc, *text ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_modify_internal: failed %d (%s)\n", rc, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
rc, *text, 0);
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_modify_internal: invalid op %d\n", mod->sm_op ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_modify_internal: invalid op %d\n", mod->sm_op, 0, 0 );
#else
Debug(LDAP_DEBUG_ANY, "ldbm_modify_internal: invalid op %d\n",
mod->sm_op, 0, 0);
rc = LDAP_OTHER;
*text = "Invalid modify operation";
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_modify_internal: %d (%s)\n", rc, *text ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_modify_internal: %d (%s)\n", rc, *text, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_modify_internal: %d %s\n",
rc, *text, 0);
rc = entry_schema_check( be, e, save_attrs, text, textbuf, textlen );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_modify_internal: entry failed schema check: %s\n",
- *text ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_modify_internal: entry failed schema check: %s\n",
+ *text, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "entry failed schema check: %s\n",
*text, 0, 0 );
SLAP_INDEX_DELETE_OP );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_modify_internal: Attribute index delete failure\n" ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_modify_internal: Attribute index delete failure\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Attribute index delete failure",
SLAP_INDEX_ADD_OP );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_modify_internal: Attribute index add failure\n" ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_modify_internal: Attribute index add failure\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Attribute index add failure",
size_t textlen = sizeof textbuf;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_back_modify: enter\n" ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_back_modify: enter\n", 0, 0, 0);
#else
Debug(LDAP_DEBUG_ARGS, "ldbm_back_modify:\n", 0, 0, 0);
#endif
conn, op, e );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modify: entry (%s) is referral\n", ndn->bv_val ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modify: entry (%s) is referral\n", ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
0, 0 );
int manageDSAit = get_manageDSAit( op );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( BACK_LDBM, ENTRY,
"ldbm_back_modrdn: dn: %s newSuperior=%s\n",
dn->bv_len ? dn->bv_val : "NULL",
- ( newSuperior && newSuperior->bv_len )
- ? newSuperior->bv_val : "NULL" ));
+ ( newSuperior && newSuperior->bv_len ) ? newSuperior->bv_val : "NULL",0 );
#else
Debug( LDAP_DEBUG_TRACE,
"==>ldbm_back_modrdn: dn: %s newSuperior=%s\n",
conn, op, e );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: entry %s is a referral\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: entry %s is a referral\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry %s is referral\n", e->e_dn,
0, 0 );
if ( has_children( be, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: entry %s has children\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: entry %s has children\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry %s has children\n", e->e_dn,
0, 0 );
if( (p = dn2entry_w( be, &p_ndn, NULL )) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: parent of %s does not exist\n", e->e_ndn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: parent of %s does not exist\n",
+ e->e_ndn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "parent does not exist\n",
0, 0, 0);
children, NULL, ACL_WRITE, NULL ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: no access to parent of (%s)\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: no access to parent of (%s)\n",
+ e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "no access to parent\n", 0,
0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_modrdn: wr to children of entry %s OK\n",
- p_ndn.bv_val ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_back_modrdn: wr to children of entry %s OK\n",
+ p_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: wr to children of entry %s OK\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_modrdn: parent dn=%s\n", p_dn.bv_val ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_back_modrdn: parent dn=%s\n", p_dn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: parent dn=%s\n",
p_dn.bv_val, 0, 0 );
/* check parent for "children" acl */
if ( ! rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_modrdn: no access "
- "to parent \"\"\n" ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_modrdn: no access to parent \"\"\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- ldbm_back_modrdn: no "
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_modrdn: (%s) has no "
- "parent & not a root.\n", dn ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_modrdn: (%s) has no parent & not a root.\n",
+ dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- ldbm_back_modrdn: no parent & "
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: (%s) no parent, locked root.\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: (%s) no parent, locked root.\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: no parent, locked root\n",
if ( newSuperior != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BACK_LDBM, DETAIL1,
"ldbm_back_modrdn: new parent \"%s\" requested\n",
- newSuperior->bv_val ));
+ newSuperior->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: new parent \"%s\" requested...\n",
/* newSuperior == oldParent? */
if ( dn_match( &p_ndn, np_ndn ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO, "ldbm_back_modrdn: "
+ LDAP_LOG( BACK_LDBM, INFO, "ldbm_back_modrdn: "
"new parent\"%s\" seems to be the same as the "
- "old parent \"%s\"\n",
- newSuperior->bv_val, p_dn.bv_val ));
+ "old parent \"%s\"\n", newSuperior->bv_val, p_dn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: "
"new parent\"%s\" seems to be the same as the "
if ( nnewSuperior->bv_len ) {
if( (np = dn2entry_w( be, np_ndn, NULL )) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_modrdn: newSup(ndn=%s) not found.\n", np_ndn->bv_val ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_modrdn: newSup(ndn=%s) not found.\n",
+ np_ndn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: newSup(ndn=%s) not here!\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BACK_LDBM, DETAIL1,
"ldbm_back_modrdn: wr to new parent OK np=%p, id=%ld\n",
- np, np->e_id ));
+ np, np->e_id, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: wr to new parent OK np=%p, id=%ld\n",
ACL_WRITE, NULL ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: no wr to newSup children.\n" ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: no wr to newSup children.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: no wr to newSup children\n",
if ( is_entry_alias( np ) ) {
/* parent is an alias, don't allow add */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: entry (%s) is an alias.\n", np->e_dn ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: entry (%s) is an alias.\n", np->e_dn,0,0);
#else
Debug( LDAP_DEBUG_TRACE, "entry is alias\n", 0, 0, 0 );
#endif
if ( is_entry_referral( np ) ) {
/* parent is a referral, don't allow add */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
+ LDAP_LOG( BACK_LDBM, INFO,
"ldbm_back_modrdn: entry (%s) is a referral\n",
- np->e_dn ));
+ np->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "entry (%s) is referral\n",
np->e_dn, 0, 0 );
/* check parent for "children" acl */
if ( ! rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+ LDAP_LOG( BACK_LDBM, ERR,
"ldbm_back_modrdn: no access "
- "to new superior \"\"\n" ));
+ "to new superior \"\"\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- ldbm_back_modrdn: no "
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "ldbm_back_modrdn: \"\" "
- "not allowed as new superior\n" ));
+ LDAP_LOG( BACK_LDBM, ERR,
+ "ldbm_back_modrdn: \"\" not allowed as new superior\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<=- ldbm_back_modrdn: \"\" "
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_modrdn: wr to new parent's children OK.\n" ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_back_modrdn: wr to new parent's children OK.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: wr to new parent's children OK\n",
dnNormalize2( NULL, &new_dn, &new_ndn );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_modrdn: new ndn=%s\n", new_ndn.bv_val ));
+ LDAP_LOG( BACK_LDBM, DETAIL1, "ldbm_back_modrdn: new ndn=%s\n",
+ new_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: new ndn=%s\n",
new_ndn.bv_val, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: new ndn (%s) does not exist\n", new_ndn.bv_val ));
+ LDAP_LOG( BACK_LDBM, INFO, "ldbm_back_modrdn: new ndn (%s) does not exist\n",
+ new_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: new ndn=%s does not exist\n",
LDAP_DN_FORMAT_LDAP ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: can't figure out type(s)/value(s) of newrdn\n" ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: can't figure out type(s)/value(s) of newrdn\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: can't figure out type(s)/value(s) of newrdn\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_modrdn: new_rdn_type=\"%s\", new_rdn_val=\"%s\"\n",
- new_rdn[0][0]->la_attr.bv_val, new_rdn[0][0]->la_value.bv_val ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_back_modrdn: new_rdn_type=\"%s\", new_rdn_val=\"%s\"\n",
+ new_rdn[0][0]->la_attr.bv_val, new_rdn[0][0]->la_value.bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: new_rdn_type=\"%s\", new_rdn_val=\"%s\"\n",
LDAP_DN_FORMAT_LDAP ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: can't figure out the old_rdn type(s)/value(s).\n" ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: can't figure out the old_rdn "
+ "type(s)/value(s).\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: can't figure out the old_rdn type(s)/value(s)\n",
{
/* Not a big deal but we may say something */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
+ LDAP_LOG( BACK_LDBM, INFO,
"ldbm_back_modrdn: old_rdn_type=%s new_rdn_type=%s\n",
- old_rdn_types[0], new_rdn_types[0] ));
+ old_rdn_types[0], new_rdn_types[0], 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: old_rdn_type=%s, new_rdn_type=%s!\n",
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_modrdn: DN_X500\n" ));
+ LDAP_LOG( BACK_LDBM, DETAIL1, "ldbm_back_modrdn: DN_X500\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DN_X500\n",
0, 0, 0 );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: slap_bv2ad error: %s (%s)\n",
- text, new_rdn[0][a_cnt]->la_attr.bv_val ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: slap_bv2ad error: %s (%s)\n",
+ text, new_rdn[0][a_cnt]->la_attr.bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: %s: %s (new)\n",
if ( ! access_allowed( be, conn, op, e,
desc, &new_rdn[0][a_cnt]->la_value, ACL_WRITE, NULL ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: access "
- "not allowed to attr \"%s\"\n",
- new_rdn[0][a_cnt]->la_attr.bv_val ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: access not allowed to attr \"%s\"\n",
+ new_rdn[0][a_cnt]->la_attr.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: access not allowed "
/* Get value of old rdn */
if ( old_rdn == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: can't figure out old RDN value(s) from old RDN\n" ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: can't figure out old RDN value(s) "
+ "from old RDN\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: can't figure out oldRDN value(s) from old RDN\n",
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: %s: %s (old)\n",
- text, old_rdn[0][d_cnt]->la_attr.bv_val ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: %s: %s (old)\n",
+ text, old_rdn[0][d_cnt]->la_attr.bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: %s: %s (old)\n",
if ( ! access_allowed( be, conn, op, e,
desc, &old_rdn[0][d_cnt]->la_value, ACL_WRITE, NULL ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_back_modrdn: access "
- "not allowed to attr \"%s\"\n",
- old_rdn[0][d_cnt]->la_attr.bv_val ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_back_modrdn: access not allowed to attr \"%s\"\n",
+ old_rdn[0][d_cnt]->la_attr.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: access not allowed "
mod = mod_tmp;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_back_modrdn: removing old_rdn_val=%s\n", old_rdn[0][d_cnt]->la_value.bv_val ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_back_modrdn: removing old_rdn_val=%s\n",
+ old_rdn[0][d_cnt]->la_value.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_back_modrdn: removing old_rdn_val=%s\n",
if ( (db = ldbm_cache_open( be, "nextid", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "next_id_read: could not open/create nextid%s\n", LDBM_SUFFIX ));
+ LDAP_LOG( BACK_LDBM, CRIT,
+ "next_id_read: could not open/create nextid%s\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not open/create nextid" LDBM_SUFFIX "\n",
0, 0, 0 );
if ( (db = ldbm_cache_open( be, "nextid", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "next_id_write: Could not open/create nextid%s\n", LDBM_SUFFIX ));
+ LDAP_LOG( BACK_LDBM, CRIT,
+ "next_id_write: Could not open/create nextid%s\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not open/create nextid" LDBM_SUFFIX "\n",
0, 0, 0 );
&id, NULL, &new, text );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_back_exop_passwd: \"%s\"\n",
- id.bv_val ? id.bv_val : "" ));
+ LDAP_LOG( BACK_LDBM, ENTRY,
+ "ldbm_back_exop_passwd: \"%s\"\n", id.bv_val ? id.bv_val : "", 0,0 );
#else
Debug( LDAP_DEBUG_ARGS, "==> ldbm_back_exop_passwd: \"%s\"\n",
id.bv_val ? id.bv_val : "", 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BACK_LDBM, DETAIL1,
"ldbm_back_exop_passwd: \"%s\"%s\n",
- dn.bv_val, id.bv_len ? " (proxy)" : "" ));
+ dn.bv_val, id.bv_len ? " (proxy)" : "", 0 );
#else
Debug( LDAP_DEBUG_TRACE, "passwd: \"%s\"%s\n",
dn.bv_val, id.bv_len ? " (proxy)" : "", 0 );
matched_dn = ch_strdup( matched->e_dn );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BACK_LDBM, DETAIL1,
"ldbm_back_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
- op->o_tag, dn->bv_val, matched_dn ));
+ op->o_tag, dn->bv_val, matched_dn );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
refs, &e->e_name, dn, LDAP_SCOPE_DEFAULT );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BACK_LDBM, DETAIL1,
"ldbm_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
- op->o_tag, dn->bv_val, e->e_dn ));
+ op->o_tag, dn->bv_val, e->e_dn );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_referrals: op=%ld target=\"%s\" matched=\"%s\"\n",
int isroot = 0;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_back_search: enter\n" ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_back_search: enter\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "=> ldbm_back_search\n", 0, 0, 0);
#endif
ldap_pvt_thread_rdwr_runlock(&li->li_giant_rwlock);
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
+ LDAP_LOG( BACK_LDBM, INFO,
"ldbm_search: entry (%s) is a referral.\n",
- e->e_dn ));
+ e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_search: entry is referral\n",
if ( candidates == NULL ) {
/* no candidates */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_search: no candidates\n" ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_search: no candidates\n" , 0, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE, "ldbm_search: no candidates\n",
0, 0, 0 );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_search: candidate %ld not found.\n", id ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_search: candidate %ld not found.\n", id, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_search: candidate %ld not found\n",
} else if ( dnIsSuffix( &e->e_nname, &realbase ) ) {
/* alias is within scope */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "ldbm_search: alias \"%s\" in subtree\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, DETAIL1,
+ "ldbm_search: alias \"%s\" in subtree\n", e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_search: alias \"%s\" in subtree\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL2,
+ LDAP_LOG( BACK_LDBM, DETAIL2,
"ldbm_search: candidate referral %ld scope not okay\n",
- id ));
+ id, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_search: candidate referral %ld scope not okay\n",
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL2,
- "ldbm_search: candidate entry %ld scope not okay\n", id ));
+ LDAP_LOG( BACK_LDBM, DETAIL2,
+ "ldbm_search: candidate entry %ld scope not okay\n",
+ id, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_search: candidate entry %ld scope not okay\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL2,
- "ldbm_search: candidate entry %ld does not match filter\n", id ));
+ LDAP_LOG( BACK_LDBM, DETAIL2,
+ "ldbm_search: candidate entry %ld does not match filter\n",
+ id, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"ldbm_search: candidate entry %ld does not match filter\n",
ID_BLOCK *idl;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "base_candidate: base (%s)\n", e->e_dn ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "base_candidate: base (%s)\n", e->e_dn, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "base_candidates: base: \"%s\"\n",
e->e_dn, 0, 0);
struct berval bv_alias = { sizeof("ALIAS")-1, "ALIAS" };
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( BACK_LDBM, DETAIL1,
"search_candidates: base (%s) scope %d deref %d\n",
- e->e_ndn, scope, deref ));
+ e->e_ndn, scope, deref );
#else
Debug(LDAP_DEBUG_TRACE,
"search_candidates: base=\"%s\" s=%d d=%d\n",
if ( (id2entry = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, flags ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "Could not open/create id2entry%s\n", LDBM_SUFFIX ));
+ LDAP_LOG( BACK_LDBM, CRIT,
+ "Could not open/create id2entry%s\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not open/create id2entry" LDBM_SUFFIX "\n",
0, 0, 0 );
e->e_id = li->li_nextid++;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_tool_entry_put: (%s)%ld\n", e->e_dn, e->e_id ));
+ LDAP_LOG( BACK_LDBM, ENTRY,
+ "ldbm_tool_entry_put: (%s)%ld\n", e->e_dn, e->e_id ,0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> ldbm_tool_entry_put( %ld, \"%s\" )\n",
e->e_id, e->e_dn, 0 );
if( id != NOID ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( BACK_LDBM, ENTRY,
"ldbm_tool_entry_put: \"%s\" already exists (id=%ld)\n",
- e->e_dn, id ));
+ e->e_dn, id, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= ldbm_tool_entry_put: \"%s\" already exists (id=%ld)\n",
Entry *e;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_tool_entry_reindex: ID=%ld\n", (long)id ));
+ LDAP_LOG( BACK_LDBM, ENTRY, "ldbm_tool_entry_reindex: ID=%ld\n",
+ (long)id, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "=> ldbm_tool_entry_reindex( %ld )\n",
(long) id, 0, 0 );
if( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "ldbm_tool_entry_reindex: could not locate id %ld\n",
- (long)id ));
+ LDAP_LOG( BACK_LDBM, INFO,
+ "ldbm_tool_entry_reindex: could not locate id %ld\n",
+ (long)id, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"ldbm_tool_entry_reindex:: could not locate id=%ld\n",
*/
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "ldbm_tool_entry_reindex: (%s) %ld\n", e->e_dn, id ));
+ LDAP_LOG( BACK_LDBM, ENTRY,
+ "ldbm_tool_entry_reindex: (%s) %ld\n", e->e_dn, id, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> ldbm_tool_entry_reindex( %ld, \"%s\" )\n",
id, e->e_dn, 0 );
struct berval mdn = { 0, NULL }, mapped;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY, "meta_back_add: %s\n",
- e->e_dn ));
+ LDAP_LOG( BACK_META, ENTRY, "meta_back_add: %s\n", e->e_dn, 0, 0 );
#else /* !NEW_LOGGING */
Debug(LDAP_DEBUG_ARGS, "==> meta_back_add: %s\n%s%s", e->e_dn, "", "");
#endif /* !NEW_LOGGING */
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] addDn: \"%s\" -> \"%s\"\n",
- e->e_dn, mdn.bv_val ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] addDn: \"%s\" -> \"%s\"\n", e->e_dn, mdn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> addDn: \"%s\" -> \"%s\"\n%s",
e->e_dn, mdn.bv_val, "" );
int realmethod = method;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "meta_back_bind: dn: %s.\n", dn->bv_val ));
+ LDAP_LOG( BACK_META, ENTRY,
+ "meta_back_bind: dn: %s.\n", dn->bv_val, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "meta_back_bind: dn: %s.\n%s%s", dn->bv_val, "", "" );
#endif /* !NEW_LOGGING */
lc = meta_back_getconn( li, conn, op, op_type, ndn, NULL );
if ( !lc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_NOTICE,
- "meta_back_bind: no target for dn %s.\n",
- dn->bv_val ));
+ LDAP_LOG( BACK_META, NOTICE,
+ "meta_back_bind: no target for dn %s.\n", dn->bv_val, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
"meta_back_bind: no target for dn %s.\n%s%s",
* ONE CANDIDATE ONLY!
*/
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_WARNING,
+ LDAP_LOG( BACK_META, WARNING,
"==>meta_back_bind: more than one"
" candidate is attempting to bind"
- " ...\n" ));
+ " ...\n" , 0, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
"==>meta_back_bind: more than one"
mdn = *dn;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] bindDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] bindDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> bindDn: \"%s\" -> \"%s\"\n%s",
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_WARNING,
+ LDAP_LOG( BACK_META, WARNING,
"meta_back_dobind: (anonymous)"
" bind as \"%s\" failed"
" with error \"%s\"\n",
lsc[ 0 ]->bound_dn.bv_val,
- ldap_err2string( rc ) ));
+ ldap_err2string( rc ), 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
"==>meta_back_dobind: (anonymous)"
err = ldap_back_map_result( err );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_RESULTS,
+ LDAP_LOG( BACK_META, RESULTS,
"meta_back_op_result: target"
" <%d> sending msg \"%s\""
" (matched \"%s\")\n",
i, ( msg ? msg : "" ),
- ( match ? match : "" ) ));
+ ( match ? match : "" ) );
#else /* !NEW_LOGGING */
Debug(LDAP_DEBUG_ANY,
"==> meta_back_op_result: target"
mdn = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] compareDn: \"%s\" -> \"%s\"\n",
- dn->bv_val, mdn ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] compareDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> compareDn: \"%s\" -> \"%s\"\n%s",
mmatch = ( char * )match;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] matchedDn: \"%s\" -> \"%s\"\n",
- match, mmatch ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] matchedDn: \"%s\" -> \"%s\"\n", match, mmatch, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> matchedDn:"
" \"%s\" -> \"%s\"\n%s",
ber_dupbv( &lsc->bound_dn, &conn->c_dn );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] bindDn: \"%s\" -> \"%s\"\n",
- conn->c_dn.bv_val, lsc->bound_dn.bv_val ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] bindDn: \"%s\" -> \"%s\"\n",
+ conn->c_dn.bv_val, lsc->bound_dn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> bindDn: \"%s\" -> \"%s\"\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "meta_back_getconn: got target %d"
- " for ndn=\"%s\" from cache\n",
- i, ndn->bv_val ));
+ LDAP_LOG( BACK_META, INFO,
+ "meta_back_getconn: got target %d for ndn=\"%s\" from cache\n",
+ i, ndn->bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_CACHE,
"==>meta_back_getconn: got target %d for ndn=\"%s\" from cache\n%s",
ldap_pvt_thread_mutex_unlock( &li->conn_mutex );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "meta_back_getconn: conn %ld inserted\n",
- lc->conn->c_connid ));
+ LDAP_LOG( BACK_META, INFO,
+ "meta_back_getconn: conn %ld inserted\n", lc->conn->c_connid, 0, 0);
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_TRACE,
"=>meta_back_getconn: conn %ld inserted\n%s%s",
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "meta_back_getconn: conn %ld fetched\n",
- lc->conn->c_connid ));
+ LDAP_LOG( BACK_META, INFO,
+ "meta_back_getconn: conn %ld fetched\n", lc->conn->c_connid, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_TRACE,
"=>meta_back_getconn: conn %ld fetched\n%s%s",
mdn = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] deleteDn: \"%s\" -> \"%s\"\n",
- dn->bv_val, mdn ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] deleteDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> deleteDn: \"%s\" -> \"%s\"\n%s",
dn->bv_val, mdn, "" );
#include "../back-ldap/back-ldap.h"
#include "back-meta.h"
-
/* return 0 IFF op_dn is a value in group_at (member) attribute
* of entry with gr_dn AND that entry has an objectClass
* value of group_oc (groupOfNames)
mop_ndn = *op_ndn;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] bindDn (op ndn in group):"
- " \"%s\" -> \"%s\"\n",
- op_ndn->bv_val, mop_ndn.bv_val));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] bindDn (op ndn in group): \"%s\" -> \"%s\"\n",
+ op_ndn->bv_val, mop_ndn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> bindDn (op ndn in group):"
mgr_ndn = *gr_ndn;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] searchBase (gr ndn in group):"
- " \"%s\" -> \"%s\"\n",
- gr_ndn->bv_val, mgr_ndn.bv_val ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] searchBase (gr ndn in group): \"%s\" -> \"%s\"\n",
+ gr_ndn->bv_val, mgr_ndn.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> searchBase (gr ndn in group):"
mdn = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] modifyDn: \"%s\" -> \"%s\"\n",
- dn->bv_val, mdn ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] modifyDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> modifyDn: \"%s\" -> \"%s\"\n%s",
dn->bv_val, mdn, "" );
mnewSuperior = ( char * )newSuperior;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] newSuperiorDn:"
- " \"%s\" -> \"%s\"\n",
- newSuperior, mnewSuperior ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] newSuperiorDn: \"%s\" -> \"%s\"\n",
+ newSuperior, mnewSuperior, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> newSuperiorDn:"
" \"%s\" -> \"%s\"\n%s",
mdn = ( char * )dn->bv_val;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] modrDn: \"%s\" -> \"%s\"\n",
- dn->bv_val, mdn ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] modrDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> modrDn: \"%s\" -> \"%s\"\n%s",
dn->bv_val, mdn, "" );
#include "back-meta.h"
#include "ldap_pvt.h"
#undef ldap_debug /* silence a warning in ldap-int.h */
+#include "ldap_log.h"
#include "../../../libraries/libldap/ldap-int.h"
static void
mbase = realbase;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] searchBase: \"%s\" -> \"%s\"\n",
- base->bv_val, mbase ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] searchBase: \"%s\" -> \"%s\"\n", base->bv_val, mbase, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> searchBase: \"%s\" -> \"%s\"\n%s",
base->bv_val, mbase, "" );
mfilter = *filterstr;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] searchFilter: \"%s\" -> \"%s\"\n",
- filterstr->bv_val, mfilter.bv_val ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] searchFilter: \"%s\" -> \"%s\"\n",
+ filterstr->bv_val, mfilter.bv_val, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> searchFilter: \"%s\" -> \"%s\"\n%s",
LDAP_OPT_MATCHED_DN, &match );
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "meta_back_search [%d]"
- " match=\"%s\" err=\"%s\"\n",
- i, match, err ));
+ LDAP_LOG( BACK_META, ERR,
+ "meta_back_search [%d] match=\"%s\" err=\"%s\"\n",
+ i, match, err );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
"=>meta_back_search [%d] match=\"%s\" err=\"%s\"\n",
mmatch = ( char * )match;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] matchedDn: \"%s\" -> \"%s\"\n",
- match, mmatch ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] matchedDn: \"%s\" -> \"%s\"\n", match, mmatch, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> matchedDn:"
" \"%s\" -> \"%s\"\n%s",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "[rw] searchResult[%d]:"
- " \"%s\" -> \"%s\"\n",
- target, bdn.bv_val, ent.e_name.bv_val ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] searchResult[%d]: \"%s\" -> \"%s\"\n",
+ target, bdn.bv_val, ent.e_name.bv_val );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS, "rw> searchResult[%d]: \"%s\""
" -> \"%s\"\n", target, bdn.bv_val, ent.e_name.bv_val );
if ( slap_bv2undef_ad( &mapped, &attr->a_desc, &text )
!= LDAP_SUCCESS) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "slap_bv2undef_ad(%s): "
- "%s\n", mapped.bv_val, text ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "slap_bv2undef_ad(%s): %s\n", mapped.bv_val, text, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
"slap_bv2undef_ad(%s): "
break;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend",
- LDAP_LEVEL_DETAIL1,
- "[rw] searchResult on"
- " attr=%s:"
- " \"%s\" -> \"%s\"\n",
- attr->a_desc->ad_type->sat_cname.bv_val,
- bv->bv_val, newval ));
+ LDAP_LOG( BACK_META, DETAIL1,
+ "[rw] searchResult on attr=%s: \"%s\" -> \"%s\"\n",
+ attr->a_desc->ad_type->sat_cname.bv_val,
+ bv->bv_val, newval );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ARGS,
"rw> searchResult on attr=%s:"
struct metaconn *lc, lc_curr;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "meta_back_conn_destroy: fetching conn %ld\n",
- conn->c_connid ));
+ LDAP_LOG( BACK_META, ENTRY,
+ "meta_back_conn_destroy: fetching conn %ld\n", conn->c_connid, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_TRACE,
"=>meta_back_conn_destroy: fetching conn %ld\n%s%s",
int i;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "meta_back_conn_destroy: destroying conn %ld\n",
- lc->conn->c_connid ));
+ LDAP_LOG( BACK_META, INFO,
+ "meta_back_conn_destroy: destroying conn %ld\n",
+ lc->conn->c_connid, 0, 0 );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_TRACE,
"=>meta_back_conn_destroy: destroying conn %ld\n%s%s",
&monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn,
&e_backend ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_backend_init: "
"unable to get entry '%s'\n",
- monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_backend_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_backend_init: "
"unable to create entry 'cn=Backend %d,%s'\n",
- i,
- monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn.bv_val ));
+ i, monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_backend_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_backend_init: "
"unable to add entry 'cn=Backend %d,%s'\n",
- i,
- monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn.bv_val ));
+ i, monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_backend_init: "
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "monitor_back_bind: dn: %s.\n", dn->bv_val ));
+ LDAP_LOG( BACK_MON, ENTRY,
+ "monitor_back_bind: dn: %s.\n", dn->bv_val, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "==> monitor_back_bind: dn: %s\n%s%s",
dn->bv_val, "", "");
if ( monitor_cache_get( mi,
&monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn, &e_conn ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_conn_init: "
"unable to get entry '%s'\n",
- monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_conn_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_conn_init: "
"unable to create entry 'cn=Total,%s'\n",
- monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_conn_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_conn_init: "
"unable to add entry 'cn=Total,%s'\n",
- monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_conn_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_conn_init: "
"unable to create entry 'cn=Current,%s'\n",
- monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_conn_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_conn_init: "
"unable to add entry 'cn=Current,%s'\n",
- monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_conn_init: "
if ( e == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_conn_create: "
"unable to create entry "
"'cn=" CONN_CN_PREFIX " %ld,%s' entry\n",
- c->c_connid,
- monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val ));
+ c->c_connid, monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_conn_create: "
&monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn,
&e_database ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_database_init: "
"unable to get entry '%s'\n",
- monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_database_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_database_init: "
"unable to create entry 'cn=Database %d,%s'\n",
- i,
- monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val ));
+ i, monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_database_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_database_init: "
"unable to add entry 'cn=Database %d,%s'\n",
- i,
- monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val ));
+ i, monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_database_init: "
*/
if ( be_monitor ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "only one monitor backend is allowed\n" ));
+ LDAP_LOG( OPERATION, CRIT,
+ "only one monitor backend is allowed\n" , 0, 0, 0);
#else
Debug( LDAP_DEBUG_ANY,
"only one monitor backend is allowed\n%s%s%s",
rc = dnNormalize2( NULL, &dn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "monitor DN \"" SLAPD_MONITOR_DN "\" backend is allowed\n" ));
+ LDAP_LOG( OPERATION, CRIT,
+ "monitor DN \"" SLAPD_MONITOR_DN "\" backend is allowed\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor DN \"" SLAPD_MONITOR_DN "\" backend is allowed\n",
if ( slap_str2ad( "description", &monitor_ad_desc, &text ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "monitor_back_db_init: %s\n", text ));
+ LDAP_LOG( OPERATION, CRIT,
+ "monitor_back_db_init: %s\n", text, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_backend_init: %s\n%s%s",
free( dn.bv_val );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor RDN \"%s\" is invalid\n",
- dn.bv_val ));
+ dn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor RDN \"%s\" is invalid\n",
free( dn.bv_val );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor DN \"%s\" is invalid\n",
- dn.bv_val ));
+ dn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor DN \"%s\" is invalid\n",
if ( e == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"unable to create '%s' entry\n",
- monitor_subsys[ i ].mss_dn.bv_val ));
+ monitor_subsys[ i ].mss_dn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"unable to create '%s' entry\n",
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"unable to add entry '%s' to cache\n",
- monitor_subsys[ i ].mss_dn.bv_val ));
+ monitor_subsys[ i ].mss_dn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"unable to add entry '%s' to cache\n",
e = str2entry( buf );
if ( e == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"unable to create '%s' entry\n",
- SLAPD_MONITOR_DN ));
+ SLAPD_MONITOR_DN, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"unable to create '%s' entry\n%s%s",
}
if ( attr_merge( e, monitor_ad_desc, bv ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"unable to add description to '%s' entry\n",
- SLAPD_MONITOR_DN ));
+ SLAPD_MONITOR_DN, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"unable to add description to '%s' entry\n%s%s",
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"unable to add entry '%s' to cache\n",
- SLAPD_MONITOR_DN ));
+ SLAPD_MONITOR_DN, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"unable to add entry '%s' to cache\n%s%s",
rc = dnNormalize2( NULL, &dn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "monitor DN \"" SLAPD_MONITOR_DN "\" is invalid\n" ));
+ LDAP_LOG( OPERATION, CRIT,
+ "monitor DN \"" SLAPD_MONITOR_DN "\" is invalid\n" , 0, 0, 0);
#else
Debug( LDAP_DEBUG_ANY,
"monitor DN \"" SLAPD_MONITOR_DN "\" is invalid\n",
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "unable to get monitor backend\n" ));
+ LDAP_LOG( OPERATION, CRIT,
+ "unable to get monitor backend\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"unable to get monitor backend\n", 0, 0, 0 );
)
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "line %d of file '%s' will be ignored\n", lineno, fname ));
+ LDAP_LOG( CONFIG, INFO,
+ "line %d of file '%s' will be ignored\n", lineno, fname, 0 );
#else
Debug( LDAP_DEBUG_CONFIG,
"line %d of file '%s' will be ignored\n%s", lineno, fname, "" );
&monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn,
&e_listener ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_listener_init: "
"unable to get entry '%s'\n",
- monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_listener_init: "
if ( ( l = slapd_get_listeners() ) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_listener_init: "
- "unable to get listeners\n" ));
+ "unable to get listeners\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_listener_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_listener_init: "
"unable to create entry 'cn=Listener, %d,%s'\n",
- i,
- monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn.bv_val ));
+ i, monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_listener_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_listener_init: "
"unable to add entry 'cn=Listener %d,%s'\n",
- i,
- monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn.bv_val ));
+ i, monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_listener_init: "
if ( monitor_cache_get( mi, &monitor_subsys[SLAPD_MONITOR_LOG].mss_ndn,
&e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_log_init: "
"unable to get entry '%s'\n",
- monitor_subsys[SLAPD_MONITOR_LOG].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_LOG].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_log_init: "
Entry *e;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "monitor_back_modify: enter\n" ));
+ LDAP_LOG( BACK_MON, ENTRY,
+ "monitor_back_modify: enter\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_ARGS, "monitor_back_modify:\n", 0, 0, 0);
#endif
if ( monitor_cache_get( mi,
&monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn, &e_op ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_ops_init: "
"unable to get entry '%s'\n",
- monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_ops_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_ops_init: "
"unable to create entry 'cn=%s,%s'\n",
bv_initiated.bv_val,
- monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_ops_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_ops_init: "
"unable to add entry 'cn=%s,%s'\n",
bv_initiated.bv_val,
- monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_ops_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_ops_init: "
"unable to create entry 'cn=%s,cn=%s,%s'\n",
bv_op[ i ].bv_val,
bv_initiated.bv_val,
- monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_ops_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_ops_init: "
"unable to add entry 'cn=%s,cn=%s,%s'\n",
bv_op[ i ].bv_val,
bv_initiated.bv_val,
- monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_ops_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_ops_init: "
"unable to create entry 'cn=%s,%s'\n",
bv_completed.bv_val,
- monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_ops_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_ops_init: "
"unable to add entry 'cn=%s,%s'\n",
bv_completed.bv_val,
- monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_ops_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_ops_init: "
"unable to create entry 'cn=%s,cn=%s,%s'\n",
bv_op[ i ].bv_val,
bv_completed.bv_val,
- monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_ops_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_ops_init: "
"unable to add entry 'cn=%s,cn=%s,%s'\n",
bv_op[ i ].bv_val,
bv_completed.bv_val,
- monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn.bv_val );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_ops_init: "
int nentries = 0;
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
- "monitor_back_search: enter\n" ));
+ LDAP_LOG( BACK_MON, ENTRY,
+ "monitor_back_search: enter\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "=> monitor_back_search\n%s%s%s", "", "", "");
#endif
if ( monitor_cache_get( mi,
&monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn, &e_sent ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_sent_init: "
"unable to get entry '%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_sent_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_sent_init: "
"unable to create entry 'cn=Entries,%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_sent_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_sent_init: "
"unable to add entry 'cn=Entries,%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_sent_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_sent_init: "
"unable to create entry 'cn=Referrals,%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_sent_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_sent_init: "
"unable to add entry 'cn=Referrals,%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_sent_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_sent_init: "
"unable to create entry 'cn=PDU,%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_sent_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_sent_init: "
"unable to add entry 'cn=PDU,%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_sent_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_sent_init: "
"unable to create entry 'cn=Bytes,%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_sent_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_sent_init: "
"unable to add entry 'cn=Bytes,%s'\n",
- monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_sent_init: "
&monitor_subsys[SLAPD_MONITOR_THREAD].mss_ndn, &e ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_thread_init: unable to get entry '%s'\n",
- monitor_subsys[SLAPD_MONITOR_THREAD].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_THREAD].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_thread_init: unable to get entry '%s'\n",
if ( monitor_cache_get( mi,
&monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn, &e_time ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_time_init: "
"unable to get entry '%s'\n",
- monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_time_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_time_init: "
"unable to create entry 'cn=Start,%s'\n",
- monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_time_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_time_init: "
"unable to add entry 'cn=Start,%s'\n",
- monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_time_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_time_init: "
"unable to create entry 'cn=Current,%s'\n",
- monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_time_init: "
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_time_init: "
"unable to add entry 'cn=Current,%s'\n",
- monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_TIME].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_time_init: "
if((nBackendInfo != 0) || (backendInfo != NULL)) {
/* already initialized */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "backend_init: backend already initialized\n" ));
+ LDAP_LOG( BACKEND, ERR,
+ "backend_init: backend already initialized\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend_init: already initialized.\n", 0, 0, 0 );
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
+ LDAP_LOG( BACKEND, INFO,
"backend_init: initialized for type \"%s\"\n",
- binfo[nBackendInfo].bi_type ));
+ binfo[nBackendInfo].bi_type, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend_init: initialized for type \"%s\"\n",
#else
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
- "backend_init: failed\n" ));
+ LDAP_LOG( BACKEND, ERR, "backend_init: failed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend_init: failed\n",
if ((rc = aBackendInfo->bi_init(aBackendInfo)) != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+ LDAP_LOG( BACKEND, ERR,
"backend_add: initialization for type \"%s\" failed\n",
- aBackendInfo->bi_type ));
+ aBackendInfo->bi_type, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend_add: initialization for type \"%s\" failed\n",
if( ! ( nBackendDB > 0 ) ) {
/* no databases */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
- "backend_startup: %d databases to startup. \n",
- nBackendDB ));
+ LDAP_LOG( BACKEND, INFO,
+ "backend_startup: %d databases to startup. \n", nBackendDB, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend_startup: %d databases to startup.\n",
if(be != NULL) {
/* startup a specific backend database */
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
- "backend_startup: starting \"%s\"\n",
- be->be_suffix[0].bv_val ));
+ LDAP_LOG( BACKEND, DETAIL1, "backend_startup: starting \"%s\"\n",
+ be->be_suffix[0].bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"backend_startup: starting \"%s\"\n",
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_open failed!\n" ));
+ LDAP_LOG( BACKEND, CRIT, "backend_startup: bi_open failed!\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend_startup: bi_open failed!\n",
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_db_open failed! (%d)\n", rc ));
+ LDAP_LOG( BACKEND, CRIT,
+ "backend_startup: bi_db_open failed! (%d)\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend_startup: bi_db_open failed! (%d)\n",
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_open %d failed!\n", i ));
+ LDAP_LOG( BACKEND, CRIT,
+ "backend_startup: bi_open %d failed!\n", i, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend_startup: bi_open %d failed!\n",
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_db_open(%d) failed! (%d)\n",
- i, rc ));
+ LDAP_LOG( BACKEND, CRIT,
+ "backend_startup: bi_db_open(%d) failed! (%d)\n", i, rc, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend_startup: bi_db_open(%d) failed! (%d)\n",
if(rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_NOTICE,
- "backend_shutdown: bi_close %s failed!\n",
- backendDB[i].be_type ));
+ LDAP_LOG( BACKEND, NOTICE,
+ "backend_shutdown: bi_close %s failed!\n",
+ backendDB[i].be_type, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend_close: bi_close %s failed!\n",
Backend *be;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_bind: conn %d\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ENTRY, "do_bind: conn %d\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_bind\n", 0, 0, 0 );
#endif
if ( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_bind: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_bind: conn %d ber_scanf failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "bind: ber_scanf failed\n", 0, 0, 0 );
#endif
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_bind: conn %d get_ctrls failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, INFO,
+ "do_bind: conn %d get_ctrls failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_bind: get_ctrls failed\n", 0, 0, 0 );
#endif
rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_bind: conn %d invalid dn (%s)\n",
- conn->c_connid, dn.bv_val ));
+ LDAP_LOG( OPERATION, INFO,
+ "do_bind: conn %d invalid dn (%s)\n",
+ conn->c_connid, dn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY, "bind: invalid dn (%s)\n",
dn.bv_val, 0, 0 );
if( method == LDAP_AUTH_SASL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_sasl_bind: conn %d dn (%s) mech %s\n", conn->c_connid,
- pdn.bv_val, mech.bv_val ));
+ LDAP_LOG( OPERATION, DETAIL1,
+ "do_sasl_bind: conn %d dn (%s) mech %s\n",
+ conn->c_connid, pdn.bv_val, mech.bv_val );
#else
Debug( LDAP_DEBUG_TRACE, "do_sasl_bind: dn (%s) mech %s\n",
pdn.bv_val, mech.bv_val, NULL );
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_bind: conn %d version=%ld dn=\"%s\" method=%ld\n",
- conn->c_connid, (unsigned long) version,
- pdn.bv_val, (unsigned long)method ));
+ LDAP_LOG( OPERATION, DETAIL1,
+ "do_bind: version=%ld dn=\"%s\" method=%ld\n",
+ (unsigned long) version, pdn.bv_val, (unsigned long)method );
#else
Debug( LDAP_DEBUG_TRACE,
"do_bind: version=%ld dn=\"%s\" method=%ld\n",
if ( version < LDAP_VERSION_MIN || version > LDAP_VERSION_MAX ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_bind: conn %d unknown version = %ld\n",
- conn->c_connid, (unsigned long)version ));
+ conn->c_connid, (unsigned long)version, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_bind: unknown version=%ld\n",
(unsigned long) version, 0, 0 );
if ( version < LDAP_VERSION3 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_bind: conn %d sasl with LDAPv%ld\n",
- conn->c_connid, (unsigned long)version ));
+ conn->c_connid, (unsigned long)version , 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_bind: sasl with LDAPv%ld\n",
(unsigned long) version, 0, 0 );
if( mech.bv_len == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_bind: conn %d no SASL mechanism provided\n",
- conn->c_connid ));
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_bind: no sasl mechanism provided\n",
send_ldap_result( conn, op, rc,
NULL, text, NULL, NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( OPERATION, DETAIL1,
"do_bind: conn %d v%d anonymous bind\n",
- conn->c_connid, version ));
+ conn->c_connid, version , 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_bind: v%d anonymous bind\n",
version, 0, 0 );
send_ldap_result( conn, op, rc,
NULL, text, NULL, NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_bind: conn %d v%d simple bind(%s) disallowed\n",
- conn->c_connid, version, ndn.bv_val ));
+ conn->c_connid, version, ndn.bv_val );
#else
Debug( LDAP_DEBUG_TRACE,
"do_bind: v%d simple bind(%s) disallowed\n",
NULL, text, NULL, NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO, "do_bind: conn %d "
+ LDAP_LOG( OPERATION, INFO, "do_bind: conn %d "
"v%d unprotected simple bind(%s) disallowed\n",
- conn->c_connid, version, ndn.bv_val ));
+ conn->c_connid, version, ndn.bv_val );
#else
Debug( LDAP_DEBUG_TRACE,
"do_bind: v%d unprotected simple bind(%s) disallowed\n",
send_ldap_result( conn, op, rc,
NULL, text, NULL, NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( OPERATION, DETAIL1,
"do_bind: conn %d v%d Kerberos V4 bind\n",
- conn->c_connid, version ));
+ conn->c_connid, version , 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_bind: v%d Kerberos V4 bind\n",
version, 0, 0 );
send_ldap_result( conn, op, rc,
NULL, text, NULL, NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_bind: conn %ld v%d unknown authentication method (%ld)\n",
- conn->c_connid, version, method ));
+ conn->c_connid, version, method );
#else
Debug( LDAP_DEBUG_TRACE,
"do_bind: v%d unknown authentication method (%ld)\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_bind: conn %d v%d bind: \"%s\" to \"%s\" \n",
- conn->c_connid, version, dn.bv_val, conn->c_dn.bv_val ));
+ LDAP_LOG( OPERATION, DETAIL1,
+ "do_bind: v%d bind: \"%s\" to \"%s\" \n",
+ version, conn->c_dn.bv_val, conn->c_dn.bv_val );
#else
Debug( LDAP_DEBUG_TRACE,
"do_bind: v%d bind: \"%s\" to \"%s\"\n",
if ( (new = (void *) ber_memalloc( size )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "ch_malloc: allocation of %lu bytes failed\n",
- (long)size ));
+ LDAP_LOG( OPERATION, ERR,
+ "ch_malloc: allocation of %lu bytes failed\n", (long)size, 0,0 );
#else
Debug( LDAP_DEBUG_ANY, "ch_malloc of %lu bytes failed\n",
(long) size, 0, 0 );
if ( (new = (void *) ber_memrealloc( block, size )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "ch_realloc: reallocation of %lu bytes failed\n", (long)size ));
+ LDAP_LOG( OPERATION, ERR,
+ "ch_realloc: reallocation of %lu bytes failed\n", (long)size, 0,0 );
#else
Debug( LDAP_DEBUG_ANY, "ch_realloc of %lu bytes failed\n",
(long) size, 0, 0 );
if ( (new = (void *) ber_memcalloc( nelem, size )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG( OPERATION, ERR,
"ch_calloc: allocation of %lu elements of %lu bytes faild\n",
- (long)nelem, (long)size ));
+ (long)nelem, (long)size, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ch_calloc of %lu elems of %lu bytes failed\n",
(long) nelem, (long) size, 0 );
if ( (new = ber_strdup( string )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "chr_strdup: duplication of \"%s\" failed\n", string ));
+ LDAP_LOG( OPERATION, ERR,
+ "chr_strdup: duplication of \"%s\" failed\n", string, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ch_strdup(%s) failed\n", string, 0, 0 );
#endif
ava.aa_desc = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_compare: conn %d\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ENTRY, "do_compare: conn %d\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_compare\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "{m" /*}*/, &dn ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_compare: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_compare: conn %d ber_scanf failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_scanf failed\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "{mm}", &desc, &value ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_compare: conn %d get ava failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_compare: conn %d get ava failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_compare: get ava failed\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, /*{*/ "}" ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_compare: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_compare: conn %d ber_scanf failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_scanf failed\n", 0, 0, 0 );
#endif
if( ( rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_compare: conn %d get_ctrls failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, INFO,
+ "do_compare: conn %d get_ctrls failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_compare: get_ctrls failed\n", 0, 0, 0 );
#endif
rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_compare: conn %d invalid dn (%s)\n",
- conn->c_connid, dn.bv_val ));
+ conn->c_connid, dn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_compare: invalid dn (%s)\n", dn.bv_val, 0, 0 );
if( strcasecmp( ndn.bv_val, LDAP_ROOT_DSE ) == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_compare: conn %d dn (%s) attr(%s) value (%s)\n",
- conn->c_connid, pdn.bv_val,
- ava.aa_desc->ad_cname.bv_val, ava.aa_value.bv_val ));
+ LDAP_LOG( OPERATION, ARGS,
+ "do_compare: dn (%s) attr(%s) value (%s)\n",
+ pdn.bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value.bv_val );
#else
Debug( LDAP_DEBUG_ARGS, "do_compare: dn (%s) attr (%s) value (%s)\n",
pdn.bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value.bv_val );
} else if ( strcasecmp( ndn.bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_compare: conn %d dn (%s) attr(%s) value (%s)\n",
- conn->c_connid, pdn.bv_val, ava.aa_desc->ad_cname.bv_val,
- ava.aa_value.bv_val ));
+ LDAP_LOG( OPERATION, ARGS,
+ "do_compare: dn (%s) attr(%s) value (%s)\n",
+ pdn.bv_val, ava.aa_desc->ad_cname.bv_val,
+ ava.aa_value.bv_val );
#else
Debug( LDAP_DEBUG_ARGS, "do_compare: dn (%s) attr (%s) value (%s)\n",
pdn.bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value.bv_val );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_compare: conn %d dn (%s) attr(%s) value (%s)\n",
- conn->c_connid, pdn.bv_val, ava.aa_desc->ad_cname.bv_val,
- ava.aa_value.bv_val ));
+ LDAP_LOG( OPERATION, ARGS,
+ "do_compare: dn (%s) attr(%s) value (%s)\n",
+ pdn.bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value.bv_val );
#else
Debug( LDAP_DEBUG_ARGS, "do_compare: dn (%s) attr (%s) value (%s)\n",
pdn.bv_val, ava.aa_desc->ad_cname.bv_val, ava.aa_value.bv_val );
if ( (fp = fopen( fname, "r" )) == NULL ) {
ldap_syslog = 1;
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_ENTRY, "read_config: "
- "could not open config file \"%s\": %s (%d)\n",
- fname, strerror(errno), errno ));
+ LDAP_LOG( CONFIG, ENTRY,
+ "read_config: " "could not open config file \"%s\": %s (%d)\n",
+ fname, strerror(errno), errno );
#else
Debug( LDAP_DEBUG_ANY,
"could not open config file \"%s\": %s (%d)\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_ENTRY,
- "read_config: reading config file %s\n", fname ));
+ LDAP_LOG( CONFIG, ENTRY,
+ "read_config: reading config file %s\n", fname, 0, 0 );
#else
Debug( LDAP_DEBUG_CONFIG, "reading config file %s\n", fname, 0, 0 );
#endif
if ( cargc < 1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: bad config line (ignored)\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: bad config line (ignored)\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: bad config line (ignored)\n",
if ( strcasecmp( cargv[0], "backend" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s : line %d: missing type in \"backend\" line.\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing type in \"backend <type>\" line\n",
if( be != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: backend line must appear before any "
- "database definition.\n", fname, lineno ));
+ "database definition.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: backend line must appear before any database definition\n",
if( bi == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"read_config: backend %s initialization failed.\n",
- cargv[1] ));
+ cargv[1], 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"backend %s initialization failed.\n",
} else if ( strcasecmp( cargv[0], "database" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing type in \"database <type>\" line\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing type in \"database <type>\" line\n",
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing type in \"database <type>\" line\n",
if( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "database %s initialization failed.\n",
- cargv[1] ));
+ LDAP_LOG( CONFIG, CRIT,
+ "database %s initialization failed.\n", cargv[1], 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"database %s initialization failed.\n",
int c;
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing level in \"concurrency <level\" line\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing level in \"concurrency <level\" "
+ " line\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing level in \"concurrency <level>\" line\n",
if( c < 1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: invalid level (%d) in "
- "\"concurrency <level>\" line.\n",
- fname, lineno, c ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: invalid level (%d) in "
+ "\"concurrency <level>\" line.\n", fname, lineno, c );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: invalid level (%d) in \"concurrency <level>\" line\n",
long max;
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing max in \"sockbuf_max_incoming <bytes>\" line\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing max in \"sockbuf_max_incoming "
+ "<bytes>\" line\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing max in \"sockbuf_max_incoming <bytes>\" line\n",
if( max < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: invalid max value (%ld) in "
"\"sockbuf_max_incoming <bytes>\" line.\n",
- fname, lineno, max ));
+ fname, lineno, max );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: invalid max value (%ld) in "
long max;
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing max in \"sockbuf_max_incoming_auth <bytes>\" line\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing max in \"sockbuf_max_incoming_auth "
+ "<bytes>\" line\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing max in \"sockbuf_max_incoming_auth <bytes>\" line\n",
if( max < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: invalid max value (%ld) in "
"\"sockbuf_max_incoming_auth <bytes>\" line.\n",
- fname, lineno, max ));
+ fname, lineno, max );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: invalid max value (%ld) in "
} else if ( strcasecmp( cargv[0], "defaultSearchBase" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing dn in \"defaultSearchBase <dn\" "
- "line\n", fname, lineno ));
+ "line\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"missing dn in \"defaultSearchBase <dn>\" line\n",
} else if ( cargc > 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: extra cruft after <dn> in "
"\"defaultSearchBase %s\" line (ignored)\n",
- fname, lineno, cargv[1] ));
+ fname, lineno, cargv[1] );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"extra cruft after <dn> in \"defaultSearchBase %s\", "
if ( bi != NULL || be != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: defaultSearchBase line must appear "
"prior to any backend or database definitions\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"defaultSearchBaase line must appear prior to "
if ( default_search_nbase.bv_len ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO, "%s: line %d: "
+ LDAP_LOG( CONFIG, INFO, "%s: line %d: "
"default search base \"%s\" already defined "
"(discarding old)\n", fname, lineno,
- default_search_base.bv_val ));
+ default_search_base.bv_val );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"default search base \"%s\" already defined "
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: defaultSearchBase DN is invalid.\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: defaultSearchBase DN is invalid\n",
int c;
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing count in \"threads <count>\" line\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing count in \"threads <count>\" line\n",
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing count in \"threads <count>\" line\n",
if( c < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: invalid level (%d) in \"threads <count>\""
- "line\n",fname, lineno, c ));
+ "line\n", fname, lineno, c );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: invalid level (%d) in \"threads <count>\" line\n",
} else if ( strcasecmp( cargv[0], "pidfile" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d missing file name in \"pidfile <file>\" line.\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d missing file name in \"pidfile <file>\" "
+ "line.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing file name in \"pidfile <file>\" line\n",
} else if ( strcasecmp( cargv[0], "argsfile" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: %d: missing file name in "
"\"argsfile <file>\" line.\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing file name in \"argsfile <file>\" line\n",
} else if ( strcasecmp( cargv[0], "password-hash" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing hash in "
"\"password-hash <hash>\" line.\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing hash in \"password-hash <hash>\" line\n",
}
if ( default_passwd_hash != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: already set default password_hash!\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: already set default password_hash!\n",
if ( lutil_passwd_scheme( cargv[1] ) == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: password scheme \"%s\" not available\n",
- fname, lineno, cargv[1] ));
+ fname, lineno, cargv[1] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: password scheme \"%s\" not available\n",
{
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing format in "
"\"password-crypt-salt-format <format>\" line\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: missing format in "
"\"password-crypt-salt-format <format>\" line\n",
int err;
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing path in "
- "\"ucdata-path <path>\" line.\n",
- fname, lineno ));
+ "\"ucdata-path <path>\" line.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing path in \"ucdata-path <path>\" line\n",
if ( err <= 0 ) {
if ( err == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: ucdata already loaded, ucdata-path "
"must be set earlier in the file and/or be "
- "specified only once!\n",
- fname, lineno ));
+ "specified only once!\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: ucdata already loaded, ucdata-path must be set earlier in the file and/or be specified only once!\n",
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing limit in \"sizelimit <limit>\" line.\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing limit in \"sizelimit <limit>\" "
+ "line.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing limit in \"sizelimit <limit>\" line\n",
if ( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: unable "
- "to parse value \"%s\" "
- "in \"sizelimit "
- "<limit>\" line.\n",
- fname, lineno, cargv[i] ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: unable "
+ "to parse value \"%s\" in \"sizelimit "
+ "<limit>\" line.\n", fname, lineno, cargv[i] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unable "
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d missing limit in \"timelimit <limit>\" line.\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d missing limit in \"timelimit <limit>\" "
+ "line.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing limit in \"timelimit <limit>\" line\n",
if ( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: unable "
- "to parse value \"%s\" "
- "in \"timelimit "
- "<limit>\" line.\n",
- fname, lineno, cargv[i] ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: unable to parse value \"%s\" "
+ "in \"timelimit <limit>\" line.\n",
+ fname, lineno, cargv[i] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unable "
} else if ( strcasecmp( cargv[0], "limits" ) == 0 ) {
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_WARNING,
- "%s: line %d \"limits\" allowed only in database environment.\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, WARNING,
+ "%s: line %d \"limits\" allowed only in database "
+ "environment.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d \"limits\" allowed only in database environment.\n%s",
} else if ( strcasecmp( cargv[0], "subordinate" ) == 0 ) {
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO, "%s: line %d: "
+ LDAP_LOG( CONFIG, INFO, "%s: line %d: "
"subordinate keyword must appear inside a database "
- "definition.\n", fname, lineno ));
+ "definition.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: suffix line "
"must appear inside a database definition.\n",
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing dn in \"suffix <dn>\" line.\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"missing dn in \"suffix <dn>\" line\n",
} else if ( cargc > 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: extra cruft after <dn> in \"suffix %s\""
- " line (ignored).\n", fname, lineno, cargv[1] ));
+ " line (ignored).\n", fname, lineno, cargv[1] );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: extra cruft "
"after <dn> in \"suffix %s\" line (ignored)\n",
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: suffix line must appear inside a database "
- "definition.\n", fname, lineno ));
+ "definition.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: suffix line "
"must appear inside a database definition\n",
/* "cn=Monitor" is reserved for monitoring slap */
} else if ( strcasecmp( cargv[1], SLAPD_MONITOR_DN ) == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT, "%s: line %d: \""
+ LDAP_LOG( CONFIG, CRIT, "%s: line %d: \""
SLAPD_MONITOR_DN "\" is reserved for monitoring slapd\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: \""
SLAPD_MONITOR_DN "\" is reserved for monitoring slapd\n",
rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: suffix DN is invalid.\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: suffix DN is invalid\n",
tmp_be = select_backend( &ndn, 0, 0 );
if ( tmp_be == be ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: suffix already served by this backend "
- "(ignored)\n", fname, lineno ));
+ "(ignored)\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: suffix "
"already served by this backend (ignored)\n",
} else if ( tmp_be != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: suffix already served by a preceding "
"backend \"%s\"\n", fname, lineno,
- tmp_be->be_suffix[0].bv_val ));
+ tmp_be->be_suffix[0].bv_val );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: suffix "
"already served by a preceeding backend \"%s\"\n",
} else if( pdn.bv_len == 0 && default_search_nbase.bv_len ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: suffix DN empty and default search "
"base provided \"%s\" (assuming okay).\n",
- fname, lineno, default_search_base.bv_val ));
+ fname, lineno, default_search_base.bv_val );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"suffix DN empty and default "
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing alias and aliased_dn in "
"\"suffixAlias <alias> <aliased_dn>\" line.\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing alias and aliased_dn in "
return( 1 );
} else if ( cargc < 3 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing aliased_dn in "
"\"suffixAlias <alias> <aliased_dn>\" line\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing aliased_dn in "
} else if ( cargc > 3 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: extra cruft in suffixAlias line (ignored)\n",
- fname, lineno ));
+ fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: extra cruft in suffixAlias line (ignored)\n",
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: suffixAlias line must appear inside a "
- "database definition.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: suffix line must appear inside a database "
+ "definition.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: suffixAlias line"
rc = dnPrettyNormal( NULL, &alias, &palias, &nalias );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: alias DN is invalid.\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: alias DN is invalid.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: alias DN is invalid\n",
free( nalias.bv_val );
if ( tmp_be && tmp_be != be ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: suffixAlias served by a preceeding "
- "backend \"%s\"\n",
- fname, lineno, tmp_be->be_suffix[0].bv_val ));
+ "backend \"%s\"\n", fname, lineno,
+ tmp_be->be_suffix[0].bv_val );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: suffixAlias served by"
rc = dnPrettyNormal( NULL, &aliased, &paliased, &naliased );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: aliased DN is invalid.\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: aliased DN is invalid.\n", fname, lineno,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: aliased DN is invalid\n",
free( naliased.bv_val );
if ( tmp_be && tmp_be != be ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: suffixAlias derefs to a different backend "
"a preceeding backend \"%s\"\n",
- fname, lineno, tmp_be->be_suffix[0].bv_val ));
+ fname, lineno, tmp_be->be_suffix[0].bv_val );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: suffixAlias derefs to differnet backend"
int i;
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing depth in \"maxDerefDepth <depth>\""
- " line\n", fname, lineno ));
+ " line\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing depth in \"maxDerefDepth <depth>\" line\n",
}
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: depth line must appear inside a database "
- "definition.\n", fname, lineno ));
+ "definition.\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: depth line must appear inside a database definition.\n",
} else if ((i = atoi(cargv[1])) < 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: depth must be positive.\n",
- fname, lineno ));
+ fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: depth must be positive.\n",
} else if ( strcasecmp( cargv[0], "rootdn" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: missing dn in \"rootdn <dn>\" line.\n",
- fname, lineno ));
+ fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing dn in \"rootdn <dn>\" line\n",
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: rootdn line must appear inside a database "
- "definition.\n", fname, lineno ));
+ "definition.\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: rootdn line must appear inside a database definition.\n",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: rootdn DN is invalid.\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: rootdn DN is invalid.\n",
+ fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: rootdn DN is invalid\n",
} else if ( strcasecmp( cargv[0], "rootpw" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing passwd in \"rootpw <passwd>\""
- " line\n", fname, lineno ));
+ " line\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"missing passwd in \"rootpw <passwd>\" line\n",
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO, "%s: line %d: "
+ LDAP_LOG( CONFIG, INFO, "%s: line %d: "
"rootpw line must appear inside a database "
- "definition.\n", fname, lineno ));
+ "definition.\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"rootpw line must appear inside a database "
if( tmp_be != be ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: "
- "rootpw can only be set when rootdn is under suffix\n"
- fname, lineno ));
+ "rootpw can only be set when rootdn is under suffix\n",
+ fname, lineno, "" );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"rootpw can only be set when rootdn is under suffix\n",
} else if ( strcasecmp( cargv[0], "readonly" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing on|off in \"readonly <on|off>\" line.\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing on|off in \"readonly <on|off>\" "
+ "line.\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing on|off in \"readonly <on|off>\" line\n",
if ( be != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: allow line must appear prior to "
- "database definitions.\n", fname, lineno ));
+ "database definitions.\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: allow line must appear prior to database definitions\n",
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing feature(s) in \"allow <features>\""
- " line\n", fname, lineno ));
+ " line\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing feature(s) in \"allow <features>\" line\n",
} else if( strcasecmp( cargv[i], "none" ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: unknown feature %s in "
"\"allow <features>\" line.\n",
- fname, lineno, cargv[1] ));
+ fname, lineno, cargv[1] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unknown feature %s in \"allow <features>\" line\n",
if ( be != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: disallow line must appear prior to "
- "database definitions.\n", fname, lineno ));
+ "database definitions.\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: disallow line must appear prior to database definitions\n",
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing feature(s) in \"disallow <features>\""
- " line.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing feature(s) in \"disallow <features>\""
+ " line.\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing feature(s) in \"disallow <features>\" line\n",
} else if( strcasecmp( cargv[i], "none" ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: unknown feature %s in "
"\"disallow <features>\" line.\n",
- fname, lineno, cargv[i] ));
+ fname, lineno, cargv[i] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unknown feature %s in \"disallow <features>\" line\n",
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing feature(s) in "
- "\"require <features>\" line.\n", fname, lineno ));
+ "\"require <features>\" line.\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing feature(s) in \"require <features>\" line\n",
} else if( strcasecmp( cargv[i], "none" ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: unknown feature %s in "
- "\"require <features>\" line.\n",
- fname, lineno ));
+ "\"require <features>\" line.\n",
+ fname, lineno , cargv[i] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unknown feature %s in \"require <features>\" line\n",
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing factor(s) in \"security <factors>\""
- " line.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing factor(s) in \"security <factors>\""
+ " line.\n", fname, lineno ,0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing factor(s) in \"security <factors>\" line\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: unknown factor %S in "
"\"security <factors>\" line.\n",
- fname, lineno, cargv[1] ));
+ fname, lineno, cargv[1] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unknown factor %s in \"security <factors>\" line\n",
} else if ( strcasecmp( cargv[0], "referral" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing URL in \"referral <URL>\""
- " line.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing URL in \"referral <URL>\""
+ " line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing URL in \"referral <URL>\" line\n",
if( validate_global_referral( cargv[1] ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT, "%s: line %d: "
- "invalid URL (%s) in \"referral\" line.\n",
- fname, lineno, cargv[1] ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: invalid URL (%s) in \"referral\" line.\n",
+ fname, lineno, cargv[1] );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"invalid URL (%s) in \"referral\" line.\n",
FILE *logfile;
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: Error in logfile directive, "
- "\"logfile <filename>\"\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: Error in logfile directive, "
+ "\"logfile <filename>\"\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: Error in logfile directive, \"logfile filename\"\n",
return( 1 );
}
logfile = fopen( cargv[1], "w" );
- if ( logfile != NULL ) lutil_debug_file( logfile );
+ if ( logfile != NULL ) lutil_debug_file( logfile );
#endif
/* start of a new database definition */
int level;
if ( cargc < 3 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: Error in debug directive, "
- "\"debug <subsys> <level>\"\n", fname, lineno ));
+ "\"debug <subsys> <level>\"\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: Error in debug directive, \"debug subsys level\"\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: old objectclass format not supported\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: old objectclass format not supported\n",
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: old objectclass format not supported.\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: old attribute type format not supported.\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: old attribute type format not supported.\n",
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: old attribute type format not supported.\n",
} else if ( strcasecmp( cargv[0], "schemacheck" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing on|off in "
- "\"schemacheck <on|off>\" line.\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing on|off in \"schemacheck <on|off>\""
+ " line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing on|off in \"schemacheck <on|off>\" line\n",
}
if ( strcasecmp( cargv[1], "off" ) == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: schema checking disabled! your mileage may vary!\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: schema checking disabled! your mileage may "
+ "vary!\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: schema checking disabled! your mileage may vary!\n",
} else if ( strcasecmp( cargv[0], "loglevel" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing level in \"loglevel <level>\""
- " line.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing level in \"loglevel <level>\""
+ " line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing level in \"loglevel <level>\" line\n",
} else if ( strcasecmp( cargv[0], "replica" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing host in \"replica "
- " <host[:port]\" line\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing host in \"replica "
+ " <host[:port]\" line\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing host in \"replica <host[:port]>\" line\n",
}
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: replica line must appear inside "
- "a database definition.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: replica line must appear inside "
+ "a database definition.\n", fname, lineno, 0);
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: replica line must appear inside a database definition\n",
}
if ( i == cargc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: missing host in \"replica\" line\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: missing host in \"replica\" line\n",
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing host in \"replica\" line\n",
} else if ( nr == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONFIG, INFO,
"%s: line %d: unable to add"
- " replica \"%s\"\n",
+ " replica \"%s\"\n",
fname, lineno,
- cargv[i] + 5 ));
+ cargv[i] + 5 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unable to add replica \"%s\"\n",
switch ( add_replica_suffix( be, nr, cargv[i] + 7 ) ) {
case 1:
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: suffix \"%s\" in \"replica\" line is not valid for backend (ignored)\n",
- fname, lineno, cargv[i] + 7 ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: suffix \"%s\" in \"replica\""
+ " line is not valid for backend(ignored)\n",
+ fname, lineno, cargv[i] + 7 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: suffix \"%s\" in \"replica\" line is not valid for backend (ignored)\n",
case 2:
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: unable to normalize suffix in \"replica\" line (ignored)\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: unable to normalize suffix"
+ " in \"replica\" line (ignored)\n",
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unable to normalize suffix in \"replica\" line (ignored)\n",
if ( add_replica_attrs( be, nr, arg + 1, exclude ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: attribute \"%s\" in \"replica\" line is unknown\n",
- fname, lineno, arg + 1 ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: attribute \"%s\" in "
+ "\"replica\" line is unknown\n",
+ fname, lineno, arg + 1 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: attribute \"%s\" in \"replica\" line is unknown\n",
} else if ( strcasecmp( cargv[0], "updatedn" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing dn in \"updatedn <dn>\""
- " line.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing dn in \"updatedn <dn>\""
+ " line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing dn in \"updatedn <dn>\" line\n",
}
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: updatedn line must appear inside "
- "a database definition\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: updatedn line must appear inside "
+ "a database definition\n",
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: updatedn line must appear inside a database definition\n",
rc = dnNormalize2( NULL, &dn, &be->be_update_ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: updatedn DN is invalid.\n",
- fname, lineno ));
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: updatedn DN is invalid\n",
} else if ( strcasecmp( cargv[0], "updateref" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT, "%s: line %d: "
+ LDAP_LOG( CONFIG, CRIT, "%s: line %d: "
"missing url in \"updateref <ldapurl>\" line.\n",
- fname, lineno ));
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"missing url in \"updateref <ldapurl>\" line\n",
}
if ( be == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO, "%s: line %d: updateref"
+ LDAP_LOG( CONFIG, INFO, "%s: line %d: updateref"
" line must appear inside a database definition\n",
- fname, lineno ));
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: updateref"
" line must appear inside a database definition\n",
} else if ( !be->be_update_ndn.bv_len ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO, "%s: line %d: "
+ LDAP_LOG( CONFIG, INFO, "%s: line %d: "
"updateref line must come after updatedn.\n",
- fname, lineno ));
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"updateref line must after updatedn.\n",
if( validate_global_referral( cargv[1] ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT, "%s: line %d: "
+ LDAP_LOG( CONFIG, CRIT, "%s: line %d: "
"invalid URL (%s) in \"updateref\" line.\n",
- fname, lineno, cargv[1] ));
+ fname, lineno, cargv[1] );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"invalid URL (%s) in \"updateref\" line.\n",
} else if ( strcasecmp( cargv[0], "replogfile" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing filename in \"replogfile <filename>\""
- " line.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing filename in \"replogfile <filename>\""
+ " line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing filename in \"replogfile <filename>\" line\n",
} else if ( strcasecmp( cargv[0], "rootDSE" ) == 0) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT, "%s: line %d: "
+ LDAP_LOG( CONFIG, CRIT, "%s: line %d: "
"missing filename in \"rootDSE <filename>\" line.\n",
- fname, lineno ));
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"missing filename in \"rootDSE <filename>\" line.\n",
if( read_root_dse_file( cargv[1] ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT, "%s: line %d: "
+ LDAP_LOG( CONFIG, CRIT, "%s: line %d: "
"could not read \"rootDSE <filename>\" line.\n",
- fname, lineno ));
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
"could not read \"rootDSE <filename>\" line\n",
} else if ( strcasecmp( cargv[0], "lastmod" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing on|off in \"lastmod <on|off>\""
- " line.\n", fname, lineno ));
+ " line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing on|off in \"lastmod <on|off>\" line\n",
int i;
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing timeout value in "
- "\"idletimeout <seconds>\" line.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing timeout value in "
+ "\"idletimeout <seconds>\" line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing timeout value in \"idletimeout <seconds>\" line\n",
if( i < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: timeout value (%d) invalid "
- "\"idletimeout <seconds>\" line.\n",
- fname, lineno, i ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: timeout value (%d) invalid "
+ "\"idletimeout <seconds>\" line.\n", fname, lineno, i );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: timeout value (%d) invalid \"idletimeout <seconds>\" line\n",
} else if ( strcasecmp( cargv[0], "include" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing filename in \"include "
- "<filename>\" line.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing filename in \"include "
+ "<filename>\" line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing filename in \"include <filename>\" line\n",
} else if ( strcasecmp( cargv[0], "srvtab" ) == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: missing filename in \"srvtab "
- "<filename>\" line.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing filename in \"srvtab "
+ "<filename>\" line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing filename in \"srvtab <filename>\" line\n",
} else if (strcasecmp( cargv[0], "moduleload") == 0 ) {
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: missing filename in \"moduleload "
- "<filename>\" line.\n", fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: missing filename in \"moduleload "
+ "<filename>\" line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing filename in \"moduleload <filename>\" line\n",
}
if (module_load(cargv[1], cargc - 2, (cargc > 2) ? cargv + 2 : NULL)) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: failed to load or initialize module %s\n",
- fname, lineno, cargv[1] ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: failed to load or initialize module %s\n",
+ fname, lineno, cargv[1] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: failed to load or initialize module %s\n",
} else if (strcasecmp( cargv[0], "modulepath") == 0 ) {
if ( cargc != 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: missing path in \"modulepath <path>\""
- " line\n", fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: missing path in \"modulepath <path>\""
+ " line\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing path in \"modulepath <path>\" line\n",
}
if (module_path( cargv[1] )) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "%s: line %d: failed to set module search path to %s.\n",
- fname, lineno, cargv[1] ));
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: failed to set module search path to %s.\n",
+ fname, lineno, cargv[1] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: failed to set module search path to %s\n",
#ifdef SLAPD_RLOOKUPS
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: reverse-lookup: "
- "missing \"on\" or \"off\"\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: reverse-lookup: missing \"on\" or \"off\"\n",
+ fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: reverse-lookup: missing \"on\" or \"off\"\n",
use_reverse_lookup = 0;
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: reverse-lookup: "
- "must be \"on\" (default) "
- "or \"off\"\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: reverse-lookup: "
+ "must be \"on\" (default) or \"off\"\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: reverse-lookup: must be \"on\" (default) or \"off\"\n",
#else /* !SLAPD_RLOOKUPS */
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: reverse lookups "
- "are not configured (ignored).\n",
- fname, lineno ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: reverse lookups "
+ "are not configured (ignored).\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: reverse lookups are not configured (ignored).\n",
if ( bi != NULL ) {
if ( bi->bi_config == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: unknown directive \"%s\" inside "
- "backend info definition (ignored).\n",
- fname, lineno, cargv[0] ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: unknown directive \"%s\" inside "
+ "backend info definition (ignored).\n",
+ fname, lineno, cargv[0] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unknown directive \"%s\" inside backend info definition (ignored)\n",
} else if ( be != NULL ) {
if ( be->be_config == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: uknown directive \"%s\" inside "
- "backend database definition (ignored).\n",
- fname, lineno, cargv[0] ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: uknown directive \"%s\" inside "
+ "backend database definition (ignored).\n",
+ fname, lineno, cargv[0] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unknown directive \"%s\" inside backend database definition (ignored)\n",
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_INFO,
- "%s: line %d: unknown directive \"%s\" outside backend "
- "info and database definitions (ignored).\n",
- fname, lineno, cargv[0] ));
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: unknown directive \"%s\" outside backend "
+ "info and database definitions (ignored).\n",
+ fname, lineno, cargv[0] );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: unknown directive \"%s\" outside backend info and database definitions (ignored)\n",
if ( strtok_quote_ptr )
*strtok_quote_ptr = ' ';
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_DETAIL1,
- "line %d (%s)\n", lineno, logline ));
+ LDAP_LOG( CONFIG, DETAIL1, "line %d (%s)\n", lineno, logline , 0 );
#else
Debug( LDAP_DEBUG_CONFIG, "line %d (%s)\n", lineno, logline, 0 );
#endif
sizeof(*cargv) );
if ( tmp == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_ERR,
- "line %d: out of memory\n",
- lineno ));
+ LDAP_LOG( CONFIG, ERR, "line %d: out of memory\n", lineno, 0,0 );
#else
Debug( LDAP_DEBUG_ANY,
"line %d: out of memory\n",
err = ucdata_load( path ? path : SLAPD_DEFAULT_UCDATA, UCDATA_ALL );
if ( err ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "load_ucdata: Error %d loading ucdata.\n", err ));
+ LDAP_LOG( CONFIG, CRIT,
+ "load_ucdata: Error %d loading ucdata.\n", err, 0,0 );
#else
Debug( LDAP_DEBUG_ANY, "error loading ucdata (error %d)\n",
err, 0, 0 );
if( connections != NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connections_init: already initialized.\n" ));
+ LDAP_LOG( CONNECTION, INFO,
+ "connections_init: already initialized.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "connections_init: already initialized.\n",
0, 0, 0 );
if( connections == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connections_init: allocation (%d * %ld) of connection array failed\n",
- dtblsize, (long) sizeof(Connection) ));
+ LDAP_LOG( CONNECTION, ERR,
+ "connections_init: allocation (%d * %ld) of connection "
+ "array failed\n", dtblsize, (long) sizeof(Connection), 0 );
#else
Debug( LDAP_DEBUG_ANY,
"connections_init: allocation (%d*%ld) of connection array failed\n",
if( connections == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connections_destroy: nothing to destroy.\n"));
+ LDAP_LOG( CONNECTION, INFO,
+ "connections_destroy: nothing to destroy.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "connections_destroy: nothing to destroy.\n",
0, 0, 0 );
Connection *c;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ENTRY,
- "connection_get: socket %ld\n", (long)s ));
+ LDAP_LOG( CONNECTION, ENTRY, "connection_get: socket %ld\n", (long)s, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"connection_get(%ld)\n",
assert( sd == AC_SOCKET_INVALID );
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ARGS,
- "connection_get: connection %d not used\n", s ));
+ LDAP_LOG( CONNECTION, ARGS,
+ "connection_get: connection %d not used\n", s, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_get(%d): connection not used\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_RESULTS,
- "connection_get: get for %d got connid %lu\n", s, c->c_connid ));
+ LDAP_LOG( CONNECTION, RESULTS,
+ "connection_get: get for %d got connid %lu\n", s, c->c_connid, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_get(%d): got connid=%lu\n",
if( s == AC_SOCKET_INVALID ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_init: init of socket %ld invalid.\n", (long)s ));
+ LDAP_LOG( CONNECTION, INFO,
+ "connection_init: init of socket %ld invalid.\n", (long)s, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"connection_init(%ld): invalid.\n",
if( c == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONNECTION, INFO,
"connection_init: skt %d connection table full (%d/%d)\n",
- s, i, dtblsize ));
+ s, i, dtblsize );
#else
Debug( LDAP_DEBUG_ANY,
"connection_init(%d): connection table full (%d/%d)\n",
c /* non-NULL */ ) < 0 )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONNECTION, INFO,
"connection_init: conn %lu set nonblocking failed\n",
- c->c_connid ));
+ c->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"connection_init(%d, %s): set nonblocking failed\n",
ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_GET_FD, &sd );
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CONNECTION, DETAIL1,
"connection_closing: conn %lu readying socket %d for close.\n",
- c->c_connid, sd ));
+ c->c_connid, sd, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_closing: readying conn=%lu sd=%d for close\n",
ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_GET_FD, &sd );
if( !LDAP_STAILQ_EMPTY(&c->c_ops) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( CONNECTION, DETAIL1,
"connection_close: conn %lu deferring sd %d\n",
- c->c_connid, sd ));
+ c->c_connid, sd, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_close: deferring conn=%lu sd=%d\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_RESULTS,
- "connection_close: conn %lu sd %d\n",
- c->c_connid, sd ));
+ LDAP_LOG( CONNECTION, RESULTS,
+ "connection_close: conn %lu sd %d\n", c->c_connid, sd, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "connection_close: conn=%lu sd=%d\n",
c->c_connid, sd, 0 );
if( conn->c_sasl_bind_in_progress && tag != LDAP_REQ_BIND ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_operation: conn %lu SASL bind in progress (tag=%ld).\n",
- conn->c_connid, (long)tag ));
+ LDAP_LOG( CONNECTION, ERR,
+ "connection_operation: conn %lu SASL bind in progress (tag=%ld).\n",
+ conn->c_connid, (long)tag, 0 );
#else
Debug( LDAP_DEBUG_ANY, "connection_operation: "
"error: SASL bind in progress (tag=%ld).\n",
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONNECTION, INFO,
"connection_operation: conn %lu unknown LDAP request 0x%lx\n",
- conn->c_connid, tag ));
+ conn->c_connid, tag, 0 );
#else
Debug( LDAP_DEBUG_ANY, "unknown LDAP request 0x%lx\n",
tag, 0, 0 );
{
int rc = 0;
Connection *c;
+
assert( connections != NULL );
ldap_pvt_thread_mutex_lock( &connections_mutex );
if( c == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_read: sock %ld no connection\n",
- (long)s ));
+ LDAP_LOG( CONNECTION, INFO,
+ "connection_read: sock %ld no connection\n", (long)s, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"connection_read(%ld): no connection!\n",
if( c->c_conn_state == SLAP_C_CLOSING ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_read: conn %lu connection closing, ignoring input\n",
- c->c_connid));
+ LDAP_LOG( CONNECTION, INFO,
+ "connection_read: conn %lu connection closing, ignoring input\n",
+ c->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): closing, ignoring input for id=%lu\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "connection_read: conn %lu checking for input.\n", c->c_connid ));
+ LDAP_LOG( CONNECTION, DETAIL1,
+ "connection_read: conn %lu checking for input.\n",
+ c->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): checking for input on id=%lu\n",
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ LDAP_LOG( CONNECTION, ERR,
"connection_read: conn %lu TLS accept error, error %d\n",
- c->c_connid, rc ));
+ c->c_connid, rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): TLS accept error "
rc = dnX509peerNormalize( ssl, &authid );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_read: conn %lu unable to get TLS client DN, error %d\n",
- c->c_connid, rc));
+ LDAP_LOG( CONNECTION, INFO,
+ "connection_read: conn %lu unable to get TLS client DN, "
+ "error %d\n", c->c_connid, rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): unable to get TLS client DN "
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_read: conn %lu SASL install error %d, closing\n",
- c->c_connid, rc ));
+ LDAP_LOG( CONNECTION, ERR,
+ "connection_read: conn %lu SASL install error %d, closing\n",
+ c->c_connid, rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): SASL install error "
if( rc < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_read: conn %lu input error %d, closing.\n",
- c->c_connid, rc ));
+ LDAP_LOG( CONNECTION, ERR,
+ "connection_read: conn %lu input error %d, closing.\n",
+ c->c_connid, rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_read(%d): input error=%d id=%lu, closing.\n",
if ( conn->c_currentber == NULL && (conn->c_currentber = ber_alloc())
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_input: conn %lu ber_alloc failed.\n",
- conn->c_connid ));
+ LDAP_LOG( CONNECTION, ERR,
+ "connection_input: conn %lu ber_alloc failed.\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_alloc failed\n", 0, 0, 0 );
#endif
ber_sockbuf_ctrl( conn->c_sb, LBER_SB_OPT_GET_FD, &sd );
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_input: conn %lu ber_get_next failed, errno %d (%s).\n",
- conn->c_connid, err, sock_errstr(err) ));
+ LDAP_LOG( CONNECTION, ERR,
+ "connection_input: conn %lu ber_get_next failed, errno %d (%s).\n",
+ conn->c_connid, err, sock_errstr(err) );
#else
Debug( LDAP_DEBUG_TRACE,
"ber_get_next on fd %d failed errno=%d (%s)\n",
if ( (tag = ber_get_int( ber, &msgid )) != LDAP_TAG_MSGID ) {
/* log, close and send error */
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_input: conn %lu ber_get_int returns 0x%lx.\n",
- conn->c_connid, tag ));
+ LDAP_LOG( CONNECTION, ERR,
+ "connection_input: conn %lu ber_get_int returns 0x%lx.\n",
+ conn->c_connid, tag, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_get_int returns 0x%lx\n", tag, 0,
0 );
if ( (tag = ber_peek_tag( ber, &len )) == LBER_ERROR ) {
/* log, close and send error */
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ LDAP_LOG( CONNECTION, ERR,
"connection_input: conn %lu ber_peek_tag returns 0x%lx.\n",
- conn->c_connid, tag ));
+ conn->c_connid, tag, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_peek_tag returns 0x%lx\n", tag, 0,
0 );
}
if (tag != LDAP_REQ_ABANDON && tag != LDAP_REQ_SEARCH) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ LDAP_LOG( CONNECTION, ERR,
"connection_input: conn %lu invalid req for UDP 0x%lx.\n",
- conn->c_connid, tag ));
+ conn->c_connid, tag, 0 );
#else
Debug( LDAP_DEBUG_ANY, "invalid req for UDP 0x%lx\n", tag, 0,
0 );
|| conn->c_conn_state == SLAP_C_CLOSING )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_input: conn %lu deferring operation\n",
- conn->c_connid ));
+ LDAP_LOG( CONNECTION, INFO,
+ "connection_input: conn %lu deferring operation\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "deferring operation\n", 0, 0, 0 );
#endif
if( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "connection_resched: conn %lu reaquiring locks.\n",
- conn->c_connid ));
+ LDAP_LOG( CONNECTION, DETAIL1,
+ "connection_resched: conn %lu reaquiring locks.\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_resched: reaquiring locks conn=%lu sd=%d\n",
if( conn->c_conn_state != SLAP_C_CLOSING ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "connection_resched: conn %lu closed by other thread.\n",
- conn->c_connid ));
+ LDAP_LOG( CONNECTION, INFO,
+ "connection_resched: conn %lu closed by other thread.\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "connection_resched: "
"closed by other thread conn=%lu sd=%d\n",
#endif
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "connection_resched: conn %lu attempting closing.\n",
- conn->c_connid ));
+ LDAP_LOG( CONNECTION, DETAIL1,
+ "connection_resched: conn %lu attempting closing.\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "connection_resched: "
"attempting closing conn=%lu sd=%d\n",
if ( status != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_op_activate: conn %lu thread pool submit failed.\n",
- conn->c_connid ));
+ LDAP_LOG( CONNECTION, ERR,
+ "connection_op_activate: conn %lu thread pool submit failed.\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"ldap_pvt_thread_pool_submit failed (%d)\n", status, 0, 0 );
int connection_write(ber_socket_t s)
{
Connection *c;
+
assert( connections != NULL );
ldap_pvt_thread_mutex_lock( &connections_mutex );
if( c == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "connection_write: sock %ld no connection!\n",(long)s));
+ LDAP_LOG( CONNECTION, ERR,
+ "connection_write: sock %ld no connection!\n", (long)s, 0, 0);
#else
Debug( LDAP_DEBUG_ANY,
"connection_write(%ld): no connection!\n",
c->c_n_write++;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "connection_write conn %lu waking output.\n",
- c->c_connid ));
+ LDAP_LOG( CONNECTION, DETAIL1,
+ "connection_write conn %lu waking output.\n", c->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"connection_write(%d): waking output for id=%lu\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "get_ctrls: conn %lu\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ENTRY, "get_ctrls: conn %lu\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> get_ctrls\n", 0, 0, 0 );
#endif
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "get_ctrls: conn %lu get OID failed.\n",
- conn->c_connid ));
+ LDAP_LOG( OPERATION, INFO, "get_ctrls: conn %lu get OID failed.\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> get_ctrls: get oid failed.\n",
0, 0, 0 );
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "get_ctrls: conn %lu get crit failed.\n",
- conn->c_connid ));
+ LDAP_LOG( OPERATION, INFO,
+ "get_ctrls: conn %lu get crit failed.\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> get_ctrls: get crit failed.\n",
0, 0, 0 );
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO, "get_ctrls: conn %lu: "
+ LDAP_LOG( OPERATION, INFO, "get_ctrls: conn %lu: "
"%s (%scritical): get value failed.\n",
- conn->c_connid,
- c->ldctl_oid ? c->ldctl_oid : "(NULL)",
- c->ldctl_iscritical ? "" : "non" ));
+ conn->c_connid, c->ldctl_oid ? c->ldctl_oid : "(NULL)",
+ c->ldctl_iscritical ? "" : "non" );
#else
Debug( LDAP_DEBUG_TRACE, "=> get_ctrls: conn %lu: "
"%s (%scritical): get value failed.\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"get_ctrls: conn %lu oid=\"%s\" (%scritical)\n",
- conn->c_connid,
- c->ldctl_oid ? c->ldctl_oid : "(NULL)",
- c->ldctl_iscritical ? "" : "non" ));
+ conn->c_connid, c->ldctl_oid ? c->ldctl_oid : "(NULL)",
+ c->ldctl_iscritical ? "" : "non" );
#else
Debug( LDAP_DEBUG_TRACE, "=> get_ctrls: oid=\"%s\" (%scritical)\n",
c->ldctl_oid ? c->ldctl_oid : "(NULL)",
return_results:
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_RESULTS,
- "get_ctrls: conn=%lu n=%d rc=%d err=%s\n",
- conn->c_connid, nctrls, rc, errmsg ? errmsg : "" ));
+ LDAP_LOG( OPERATION, RESULTS,
+ "get_ctrls: n=%d rc=%d err=%s\n", nctrls, rc, errmsg ? errmsg : "" );
#else
Debug( LDAP_DEBUG_TRACE, "<= get_ctrls: n=%d rc=%d err=%s\n",
nctrls, rc, errmsg ? errmsg : "");
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "parseValuesReturnFilter: conn %d vrFilter: %s\n", conn->c_connid,
- fstr.bv_len ? fstr.bv_val : "empty" ));
+ LDAP_LOG( OPERATION, ARGS,
+ "parseValuesReturnFilter: conn %d vrFilter: %s\n",
+ conn->c_connid, fstr.bv_len ? fstr.bv_val : "empty" , 0 );
#else
Debug( LDAP_DEBUG_ARGS, " vrFilter: %s\n",
fstr.bv_len ? fstr.bv_val : "empty", 0, 0 );
FD_SET( s, &slap_daemon.sd_readers );
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slapd_add: added %ld%s%s\n",
- (long)s,
- FD_ISSET(s, &slap_daemon.sd_readers) ? "r" : "",
- FD_ISSET(s, &slap_daemon.sd_writers) ? "w" : "" ));
+ LDAP_LOG( CONNECTION, DETAIL1,
+ "slapd_add: added %ld%s%s\n", (long)s,
+ FD_ISSET(s, &slap_daemon.sd_readers) ? "r" : "",
+ FD_ISSET(s, &slap_daemon.sd_writers) ? "w" : "" );
#else
Debug( LDAP_DEBUG_CONNS, "daemon: added %ld%s%s\n",
(long) s,
slap_daemon.sd_nactives--;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slapd_remove: removing %ld%s%s\n",
- (long) s,
- FD_ISSET(s, &slap_daemon.sd_readers) ? "r" : "",
- FD_ISSET(s, &slap_daemon.sd_writers) ? "w" : "" ));
+ LDAP_LOG( CONNECTION, DETAIL1,
+ "slapd_remove: removing %ld%s%s\n", (long) s,
+ FD_ISSET(s, &slap_daemon.sd_readers) ? "r" : "",
+ FD_ISSET(s, &slap_daemon.sd_writers) ? "w" : "" );
#else
Debug( LDAP_DEBUG_CONNS, "daemon: removing %ld%s%s\n",
(long) s,
static void slapd_close(ber_socket_t s) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slapd_close: closing %ld\n", (long)s ));
+ LDAP_LOG( CONNECTION, DETAIL1, "slapd_close: closing %ld\n", (long)s, 0, 0);
#else
Debug( LDAP_DEBUG_CONNS, "daemon: closing %ld\n",
(long) s, 0, 0 );
if ( strlen(host) >
(sizeof(((struct sockaddr_un *)*sap)->sun_path) - 1) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_get_listener_addresses: domain socket path (%s) too long in URL\n",
- host ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slap_get_listener_addresses: domain socket path (%s) "
+ "too long in URL\n", host, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"daemon: domain socket path (%s) too long in URL",
if ( (err = getaddrinfo(host, serv, &hints, &res)) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONNECTION, INFO,
"slap_get_listener_addresses: getaddrinfo failed: %s\n",
- AC_GAI_STRERROR(err) ));
+ AC_GAI_STRERROR(err), 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "daemon: getaddrinfo failed: %s\n",
AC_GAI_STRERROR(err), 0, 0);
for ( sai=res; sai; sai=sai->ai_next ) {
if( sai->ai_addr == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONNECTION, INFO,
"slap_get_listener_addresses: "
- "getaddrinfo ai_addr is NULL?\n" ));
+ "getaddrinfo ai_addr is NULL?\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "slap_get_listener_addresses: "
"getaddrinfo ai_addr is NULL?\n", 0, 0, 0 );
he = gethostbyname( host );
if( he == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_get_listener_addresses: invalid host %s\n",
- host ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slap_get_listener_addresses: invalid host %s\n", host, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"daemon: invalid host %s", host, 0, 0);
int err, addrlen = 0;
struct sockaddr **sal, **psal;
int socktype = SOCK_STREAM; /* default to COTS */
+
#ifdef LDAP_PF_LOCAL
mode_t perms = S_IRWXU;
int crit = 1;
if( rc != LDAP_URL_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slap_open_listener: listen URL \"%s\" parse error %d\n",
- url, rc ));
+ LDAP_LOG( CONNECTION, ERR,
+ "slap_open_listener: listen URL \"%s\" parse error %d\n",
+ url, rc , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"daemon: listen URL \"%s\" parse error=%d\n",
#ifndef HAVE_TLS
if( ldap_pvt_url_scheme2tls( lud->lud_scheme ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: TLS is not supported (%s)\n",
- url ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slap_open_listener: TLS is not supported (%s)\n", url, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"daemon: TLS not supported (%s)\n",
#else
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: URL scheme is not supported: %s\n",
- url ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slap_open_listener: URL scheme is not supported: %s\n", url, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "daemon: URL scheme not supported: %s",
url, 0, 0);
if ( l.sl_sd == AC_SOCKET_INVALID ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slap_open_listener: socket() failed errno=%d (%s)\n",
- err, sock_errstr(err) ));
+ LDAP_LOG( CONNECTION, ERR,
+ "slap_open_listener: socket() failed errno=%d (%s)\n",
+ err, sock_errstr(err), 0 );
#else
Debug( LDAP_DEBUG_ANY,
"daemon: socket() failed errno=%d (%s)\n", err,
#ifndef HAVE_WINSOCK
if ( l.sl_sd >= dtblsize ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slap_open_listener: listener descriptor %ld is too great %ld\n",
- (long)l.sl_sd, (long)dtblsize ));
+ LDAP_LOG( CONNECTION, ERR,
+ "slap_open_listener: listener descriptor %ld is too "
+ "great %ld\n", (long)l.sl_sd, (long)dtblsize, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"daemon: listener descriptor %ld is too great %ld\n",
if ( rc == AC_SOCKET_ERROR ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: setsockopt( %ld, SO_REUSEADDR ) failed errno %d (%s)\n",
- (long)l.sl_sd, err, sock_errstr(err) ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slap_open_listener: setsockopt( %ld, SO_REUSEADDR ) "
+ "failed errno %d (%s)\n", (long)l.sl_sd, err,
+ sock_errstr(err) );
#else
Debug( LDAP_DEBUG_ANY,
"slapd(%ld): setsockopt(SO_REUSEADDR) failed errno=%d (%s)\n",
if ( rc == AC_SOCKET_ERROR ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
+ LDAP_LOG( CONNECTION, INFO,
"slap_open_listener: setsockopt( %ld, IPV6_V6ONLY ) failed errno %d (%s)\n",
- (long)l.sl_sd, err, sock_errstr(err) ));
+ (long)l.sl_sd, err, sock_errstr(err) );
#else
Debug( LDAP_DEBUG_ANY,
"slapd(%ld): setsockopt(IPV6_V6ONLY) failed errno=%d (%s)\n",
if (bind(l.sl_sd, *sal, addrlen)) {
err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: bind(%ld) failed errno=%d (%s)\n",
- (long)l.sl_sd, err, sock_errstr(err) ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slap_open_listener: bind(%ld) failed errno=%d (%s)\n",
+ (long)l.sl_sd, err, sock_errstr(err) );
#else
Debug( LDAP_DEBUG_ANY, "daemon: bind(%ld) failed errno=%d (%s)\n",
(long) l.sl_sd, err, sock_errstr(err) );
if ( chmod( addr, perms ) < 0 && crit ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: fchmod(%ld) failed errno=%d (%s)\n",
- (long)l.sl_sd, err, sock_errstr(err) ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slap_open_listener: fchmod(%ld) failed errno=%d (%s)\n",
+ (long)l.sl_sd, err, sock_errstr(err) );
#else
Debug( LDAP_DEBUG_ANY, "daemon: fchmod(%ld) failed errno=%d (%s)",
(long) l.sl_sd, err, sock_errstr(err) );
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_open_listener: unsupported address family (%d)\n",
- (int)(*sal)->sa_family ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slap_open_listener: unsupported address family (%d)\n",
+ (int)(*sal)->sa_family, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "daemon: unsupported address family (%d)\n",
(int) (*sal)->sa_family, 0, 0 );
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_RESULTS,
- "slap_open_listener: daemon initialized %s\n", l.sl_url ));
+ LDAP_LOG( CONNECTION, RESULTS,
+ "slap_open_listener: daemon initialzed %s\n", l.sl_url, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "daemon: initialized %s\n",
l.sl_url, 0, 0 );
char **u;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ARGS,
- "slapd_daemon_init: %s\n",
- urls ? urls : "<null>" ));
+ LDAP_LOG( CONNECTION, ARGS,
+ "slapd_daemon_init: %s\n", urls ? urls : "<null>", 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "daemon_init: %s\n",
urls ? urls : "<null>", 0, 0 );
*/
if( (rc = lutil_pair( wake_sds )) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slap_daemon_init: lutil_pair() failed rc=%d\n", rc ));
+ LDAP_LOG( CONNECTION, ERR,
+ "slap_daemon_init: lutil_pair() failed rc=%d\n", rc, 0, 0);
#else
Debug( LDAP_DEBUG_ANY,
"daemon: lutil_pair() failed rc=%d\n", rc, 0, 0 );
if( u == NULL || u[0] == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slap_daemon_init: no urls (%s) provided.\n", urls ));
+ LDAP_LOG( CONNECTION, ERR,
+ "slap_daemon_init: no urls (%s) provided.\n", urls, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "daemon_init: no urls (%s) provided.\n",
urls, 0, 0 );
for( i=0; u[i] != NULL; i++ ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slap_daemon_init: listen on %s\n.", u[i] ));
+ LDAP_LOG( CONNECTION, DETAIL1,
+ "slap_daemon_init: listen on %s\n.", u[i], 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "daemon_init: listen on %s\n",
u[i], 0, 0 );
if( i == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_daemon_init: no listeners to open (%s)\n", urls ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slap_daemon_init: no listeners to open (%s)\n", urls, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "daemon_init: no listeners to open (%s)\n",
urls, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slap_daemon_init: %d listeners to open...\n", i ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slap_daemon_init: %d listeners to open...\n", i, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "daemon_init: %d listeners to open...\n",
i, 0, 0 );
slap_listeners[j] = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slap_daemon_init: %d listeners opened\n", i ));
+ LDAP_LOG( CONNECTION, DETAIL1,
+ "slap_daemon_init: %d listeners opened\n", i, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "daemon_init: %d listeners opened\n",
i, 0, 0 );
if ( i < l ) {
/* We are already listening to in6addr_any */
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_WARNING,
- "slapd_daemon_task: Attempt to listen to 0.0.0.0 failed, already listening on ::, assuming IPv4 included\n" ));
+ LDAP_LOG(CONNECTION, WARNING,
+ "slapd_daemon_task: Attempt to listen to 0.0.0.0 failed, already listening on ::, assuming IPv4 included\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_CONNS,
"daemon: Attempt to listen to 0.0.0.0 failed, already listening on ::, assuming IPv4 included\n",
}
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slapd_daemon_task: listen( %s, 5 ) failed errno=%d (%s)\n",
- slap_listeners[l]->sl_url, err, sock_errstr(err) ));
+ LDAP_LOG( CONNECTION, ERR,
+ "slapd_daemon_task: listen( %s, 5 ) failed errno=%d (%s)\n",
+ slap_listeners[l]->sl_url, err, sock_errstr(err) );
#else
Debug( LDAP_DEBUG_ANY,
"daemon: listen(%s, 5) failed errno=%d (%s)\n",
continue;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slapd_daemon_task: select: listen=%d active_threads=%d tvp=%s\n",
- slap_listeners[l]->sl_sd, at, tvp == NULL ? "NULL" : "zero" ));
+ LDAP_LOG( CONNECTION, DETAIL1,
+ "slapd_daemon_task: select: listen=%d "
+ "active_threads=%d tvp=%s\n",
+ slap_listeners[l]->sl_sd, at, tvp == NULL ? "NULL" : "zero" );
#else
Debug( LDAP_DEBUG_CONNS,
"daemon: select: listen=%d active_threads=%d tvp=%s\n",
if( err != EINTR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slapd_daemon_task: select failed (%d): %s\n",
- err, sock_errstr(err) ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slapd_daemon_task: select failed (%d): %s\n",
+ err, sock_errstr(err), 0 );
#else
Debug( LDAP_DEBUG_CONNS,
"daemon: select failed (%d): %s\n",
case 0: /* timeout - let threads run */
ebadf = 0;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- "slapd_daemon_task: select timeout - yielding\n" ));
+ LDAP_LOG( CONNECTION, DETAIL2,
+ "slapd_daemon_task: select timeout - yielding\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_CONNS, "daemon: select timeout - yielding\n",
0, 0, 0 );
ebadf = 0;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- "slapd_daemon_task: activity on %d descriptors\n", ns ));
+ LDAP_LOG( CONNECTION, DETAIL2,
+ "slapd_daemon_task: activity on %d descriptors\n", ns, 0, 0 );
#else
Debug( LDAP_DEBUG_CONNS, "daemon: activity on %d descriptors\n",
ns, 0, 0 );
if( emfile < 3 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ LDAP_LOG( CONNECTION, ERR,
"slapd_daemon_task: accept(%ld) failed errno=%d (%s)\n",
- (long)slap_listeners[l]->sl_sd, err, sock_errstr(err) ));
+ (long)slap_listeners[l]->sl_sd,
+ err, sock_errstr(err) );
#else
Debug( LDAP_DEBUG_ANY,
"daemon: accept(%ld) failed errno=%d (%s)\n",
/* make sure descriptor number isn't too great */
if ( s >= dtblsize ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
+ LDAP_LOG( CONNECTION, ERR,
"slapd_daemon_task: %ld beyond descriptor table size %ld\n",
- (long)s, (long)dtblsize ));
+ (long)s, (long)dtblsize, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"daemon: %ld beyond descriptor table size %ld\n",
if ( rc == AC_SOCKET_ERROR ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slapd_daemon_task: setsockopt( %ld, SO_KEEPALIVE) failed errno=%d (%s)\n",
- (long)s, err, sock_errstr(err) ));
+ LDAP_LOG( CONNECTION, ERR,
+ "slapd_daemon_task: setsockopt( %ld, SO_KEEPALIVE)"
+ " failed errno=%d (%s)\n",
+ (long)s, err, sock_errstr(err) );
#else
Debug( LDAP_DEBUG_ANY,
"slapd(%ld): setsockopt(SO_KEEPALIVE) failed "
if ( rc == AC_SOCKET_ERROR ) {
int err = sock_errno();
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slapd_daemon_task: setsockopt( %ld, TCP_NODELAY) failed errno=%d (%s)\n",
- (long)s, err, sock_errstr(err) ));
+ LDAP_LOG( CONNECTION, ERR,
+ "slapd_daemon_task: setsockopt( %ld, "
+ "TCP_NODELAY) failed errno=%d (%s)\n",
+ (long)s, err, sock_errstr(err) );
#else
Debug( LDAP_DEBUG_ANY,
"slapd(%ld): setsockopt(TCP_NODELAY) failed "
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL1,
- "slapd_daemon_task: new connection on %ld\n", (long)s ));
+ LDAP_LOG( CONNECTION, DETAIL1,
+ "slapd_daemon_task: new connection on %ld\n", (long)s, 0, 0 );
#else
Debug( LDAP_DEBUG_CONNS, "daemon: new connection on %ld\n",
(long) s, 0, 0 );
if( id < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_INFO,
- "slapd_daemon_task: connection_init(%ld, %s, %s) failed.\n",
- (long)s, peername, slap_listeners[l]->sl_name ));
+ LDAP_LOG( CONNECTION, INFO,
+ "slapd_daemon_task: connection_init(%ld, %s, %s) failed.\n",
+ (long)s, peername, slap_listeners[l]->sl_name );
#else
Debug( LDAP_DEBUG_ANY,
"daemon: connection_init(%ld, %s, %s) failed.\n",
#ifdef LDAP_DEBUG
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- "slapd_daemon_task: activity on " ));
+ LDAP_LOG( CONNECTION, DETAIL2,
+ "slapd_daemon_task: activity on ", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_CONNS, "daemon: activity on:", 0, 0, 0 );
#endif
#ifdef HAVE_WINSOCK
for ( i = 0; i < readfds.fd_count; i++ ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- " %d%s", readfds.fd_array[i], "r", 0 ));
+ LDAP_LOG( CONNECTION, DETAIL2,
+ " %d%s", readfds.fd_array[i], "r", 0, 0 );
#else
Debug( LDAP_DEBUG_CONNS, " %d%s",
readfds.fd_array[i], "r", 0 );
}
for ( i = 0; i < writefds.fd_count; i++ ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- " %d%s", writefds.fd_array[i], "w" ));
+ LDAP_LOG( CONNECTION, DETAIL2,
+ " %d%s", writefds.fd_array[i], "w" , 0 );
#else
Debug( LDAP_DEBUG_CONNS, " %d%s",
writefds.fd_array[i], "w", 0 );
w = FD_ISSET( i, &writefds );
if ( r || w ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- " %d%s%s", i,
- r ? "r" : "", w ? "w" : "" ));
+ LDAP_LOG( CONNECTION, DETAIL2,
+ " %d%s%s", i, r ? "r" : "", w ? "w" : "" );
#else
Debug( LDAP_DEBUG_CONNS, " %d%s%s", i,
r ? "r" : "", w ? "w" : "" );
}
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2, "\n" ));
+ LDAP_LOG( CONNECTION, DETAIL2, "\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_CONNS, "\n", 0, 0, 0 );
#endif
continue;
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- "slapd_daemon_task: write active on %d\n", wd ));
+ LDAP_LOG( CONNECTION, DETAIL2,
+ "slapd_daemon_task: write active on %d\n", wd, 0, 0 );
#else
Debug( LDAP_DEBUG_CONNS,
"daemon: write active on %d\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_DETAIL2,
- "slapd_daemon_task: read activity on %d\n", rd ));
+ LDAP_LOG( CONNECTION, DETAIL2,
+ "slapd_daemon_task: read activity on %d\n", rd, 0, 0 );
#else
Debug ( LDAP_DEBUG_CONNS,
"daemon: read activity on %d\n", rd, 0, 0 );
if( slapd_shutdown == 1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slapd_daemon_task: shutdown requested and initiated.\n"));
+ LDAP_LOG( CONNECTION, CRIT,
+ "slapd_daemon_task: shutdown requested and initiated.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"daemon: shutdown requested and initiated.\n",
} else if ( slapd_shutdown == 2 ) {
#ifdef HAVE_NT_SERVICE_MANAGER
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slapd_daemon_task: shutdown initiated by Service Manager.\n"));
+ LDAP_LOG( CONNECTION, CRIT,
+ "slapd_daemon_task: shutdown initiated by Service Manager.\n",
+ 0, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"daemon: shutdown initiated by Service Manager.\n",
#endif
#else /* !HAVE_NT_SERVICE_MANAGER */
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slapd_daemon_task: abnormal condition, shutdown initiated.\n" ));
+ LDAP_LOG( CONNECTION, CRIT,
+ "slapd_daemon_task: abnormal condition, "
+ "shutdown initiated.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"daemon: abnormal condition, shutdown initiated.\n",
#endif /* !HAVE_NT_SERVICE_MANAGER */
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slapd_daemon_task: no active streams, shutdown initiated.\n" ));
+ LDAP_LOG( CONNECTION, CRIT,
+ "slapd_daemon_task: no active streams, shutdown initiated.\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"daemon: no active streams, shutdown initiated.\n",
slap_listeners = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slapd_daemon_task: shutdown waiting for %d threads to terminate.\n",
- ldap_pvt_thread_pool_backload(&connection_pool) ));
+ LDAP_LOG( CONNECTION, CRIT,
+ "slapd_daemon_task: shutdown waiting for %d threads to terminate.\n",
+ ldap_pvt_thread_pool_backload(&connection_pool), 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"slapd shutdown: waiting for %d threads to terminate\n",
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_ERR,
- "slapd_daemon: listener ldap_pvt_thread_create failed (%d).\n", rc ));
+ LDAP_LOG( CONNECTION, ERR,
+ "slapd_daemon: listener ldap_pvt_thread_create failed (%d).\n",
+ rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"listener ldap_pvt_thread_create failed (%d)\n", rc, 0, 0 );
slap_sig_shutdown( int sig )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slap_sig_shutdown: signal %d\n", sig ));
+ LDAP_LOG( CONNECTION, CRIT,
+ "slap_sig_shutdown: signal %d\n", sig, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "slap_sig_shutdown: signal %d\n", sig, 0, 0);
#endif
#if HAVE_NT_SERVICE_MANAGER && SIGBREAK
if (is_NT_Service && sig == SIGBREAK)
#ifdef NEW_LOGGING
- LDAP_LOG(( "connection", LDAP_LEVEL_CRIT,
- "slap_sig_shutdown: SIGBREAK ignored.\n" ));
+ LDAP_LOG( CONNECTION, CRIT,
+ "slap_sig_shutdown: SIGBREAK ignored.\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "slap_sig_shutdown: SIGBREAK ignored.\n",
0, 0, 0);
int manageDSAit;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_delete: conn %d\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "do_delete: conn %d\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_delete\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "m", &dn ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_delete: conn: %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_delete: conn: %d ber_scanf failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_scanf failed\n", 0, 0, 0 );
#endif
if( ( rc = get_ctrls( conn, op, 1 ) ) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_delete: conn %d get_ctrls failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_delete: conn %d get_ctrls failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_delete: get_ctrls failed\n", 0, 0, 0 );
#endif
rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_delete: conn %d invalid dn (%s)\n",
- conn->c_connid, dn.bv_val ));
+ conn->c_connid, dn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_delete: invalid dn (%s)\n", dn.bv_val, 0, 0 );
if( ndn.bv_len == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO, "do_delete: conn %d: "
- "Attempt to delete root DSE.\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, INFO,
+ "do_delete: conn %d: Attempt to delete root DSE.\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_delete: root dse!\n", 0, 0, 0 );
#endif
} else if ( strcasecmp( ndn.bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO, "do_delete: conn %d: "
- "Attempt to delete subschema subentry.\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, INFO, "do_delete: conn %d: "
+ "Attempt to delete subschema subentry.\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_delete: subschema subentry!\n", 0, 0, 0 );
#endif
assert( val );
assert( out );
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ARGS, ">>> dnPretty: <%s>\n", val->bv_val, 0, 0 );
+#else
Debug( LDAP_DEBUG_TRACE, ">>> dnPretty: <%s>\n", val->bv_val, 0, 0 );
+#endif
if ( val->bv_len == 0 ) {
ber_dupbv( out, val );
struct berval *pretty,
struct berval *normal)
{
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, ENTRY, ">>> dnPrettyNormal: <%s>\n", val->bv_val, 0, 0 );
+#else
Debug( LDAP_DEBUG_TRACE, ">>> dnPrettyNormal: <%s>\n", val->bv_val, 0, 0 );
+#endif
assert( val );
assert( pretty );
}
}
+#ifdef NEW_LOGGING
+ LDAP_LOG (OPERATION, RESULTS, "<<< dnPrettyNormal: <%s>, <%s>\n",
+ pretty->bv_val, normal->bv_val, 0 );
+#else
Debug( LDAP_DEBUG_TRACE, "<<< dnPrettyNormal: <%s>, <%s>\n",
pretty->bv_val, normal->bv_val, 0 );
+#endif
return LDAP_SUCCESS;
}
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "dnMatch: %d\n %s\n %s\n", match,
- value->bv_val, asserted->bv_val ));
+ LDAP_LOG( CONFIG, ENTRY, "dnMatch: %d\n %s\n %s\n",
+ match, value->bv_val, asserted->bv_val );
#else
Debug( LDAP_DEBUG_ARGS, "dnMatch %d\n\t\"%s\"\n\t\"%s\"\n",
match, value->bv_val, asserted->bv_val );
*/
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: \"%s\"\n", s ? s : "NULL" ));
+ LDAP_LOG( OPERATION, DETAIL1, "str2entry: \"%s\"\n", s ? s : "NULL", 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> str2entry\n",
s ? s : "NULL", 0, 0 );
if( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "str2entry: entry allocation failed.\n" ));
+ LDAP_LOG( OPERATION, ERR, "str2entry: entry allocation failed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= str2entry NULL (entry allocation failed)\n",
if ( ldif_parse_line( s, &type, &vals[0].bv_val, &vals[0].bv_len ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: NULL (parse_line)\n" ));
+ LDAP_LOG( OPERATION, DETAIL1, "str2entry: NULL (parse_line)\n",0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= str2entry NULL (parse_line)\n", 0, 0, 0 );
if ( e->e_dn != NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1, "str2entry: "
+ LDAP_LOG( OPERATION, DETAIL1, "str2entry: "
"entry %ld has multiple DNs \"%s\" and \"%s\"\n",
(long) e->e_id, e->e_dn,
- vals[0].bv_val != NULL ? vals[0].bv_val : "" ));
+ vals[0].bv_val != NULL ? vals[0].bv_val : "" );
#else
Debug( LDAP_DEBUG_ANY, "str2entry: "
"entry %ld has multiple DNs \"%s\" and \"%s\"\n",
rc = dnPrettyNormal( NULL, &vals[0], &e->e_name, &e->e_nname );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1, "str2entry: "
- "entry %ld has invalid DN \"%s\"\n",
- (long) e->e_id, vals[0].bv_val ));
+ LDAP_LOG( OPERATION, DETAIL1,
+ "str2entry: entry %ld has invalid DN \"%s\"\n",
+ (long) e->e_id, vals[0].bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY, "str2entry: "
"entry %ld has invalid DN \"%s\"\n",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: str2ad(%s): %s\n", type, text ));
+ LDAP_LOG( OPERATION, DETAIL1,
+ "str2entry: str2ad(%s): %s\n", type, text, 0 );
#else
Debug( slapMode & SLAP_TOOL_MODE
? LDAP_DEBUG_ANY : LDAP_DEBUG_TRACE,
rc = slap_str2undef_ad( type, &ad, &text );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: str2undef_ad(%s): %s\n", type, text ));
+ LDAP_LOG( OPERATION, DETAIL1,
+ "str2entry: str2undef_ad(%s): %s\n", type, text, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= str2entry: str2undef_ad(%s): %s\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"str2entry: no validator for syntax %s\n",
- ad->ad_type->sat_syntax->ssyn_oid ));
+ ad->ad_type->sat_syntax->ssyn_oid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"str2entry: no validator for syntax %s\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG( OPERATION, ERR,
"str2entry: invalid value for syntax %s\n",
- ad->ad_type->sat_syntax->ssyn_oid ));
+ ad->ad_type->sat_syntax->ssyn_oid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"str2entry: invalid value for syntax %s\n",
rc = attr_merge( e, ad, vals );
if( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: NULL (attr_merge)\n" ));
+ LDAP_LOG( OPERATION, DETAIL1,
+ "str2entry: NULL (attr_merge)\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= str2entry NULL (attr_merge)\n", 0, 0, 0 );
/* check to make sure there was a dn: line */
if ( e->e_dn == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "str2entry: entry %ld has no dn.\n",
- (long) e->e_id ));
+ LDAP_LOG( OPERATION, INFO,
+ "str2entry: entry %ld has no dn.\n", (long) e->e_id, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "str2entry: entry %ld has no dn\n",
(long) e->e_id, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL2,
- "str2entry(%s) -> 0x%lx\n", e->e_dn, (unsigned long)e ));
+ LDAP_LOG( OPERATION, DETAIL2,
+ "str2entry(%s) -> 0x%lx\n", e->e_dn, (unsigned long)e, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "<= str2entry(%s) -> 0x%lx\n",
e->e_dn, (unsigned long) e, 0 );
unsigned char *ptr;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "entry_encode: id: 0x%08lx \"%s\"\n",
- (long) e->e_id, e->e_dn ));
+ LDAP_LOG( OPERATION, DETAIL1, "entry_encode: id: 0x%08lx \"%s\"\n",
+ (long) e->e_id, e->e_dn, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "=> entry_encode(0x%08lx): %s\n",
(long) e->e_id, e->e_dn, 0 );
x->e_nname.bv_len = i;
ptr += i+1;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL2,
- "entry_decode: \"%s\"\n", x->e_dn ));
+ LDAP_LOG( OPERATION, DETAIL2, "entry_decode: \"%s\"\n", x->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"entry_decode: \"%s\"\n",
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "entry_decode: str2ad(%s): %s\n", ptr, text ));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_decode: str2ad(%s): %s\n", ptr, text, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<= entry_decode: str2ad(%s): %s\n", ptr, text, 0 );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "entry_decode: str2undef_ad(%s): %s\n", ptr, text));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_decode: str2undef_ad(%s): %s\n", ptr, text, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"<= entry_decode: str2undef_ad(%s): %s\n",
if (a)
a->a_next = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "entry_decode: %s\n", x->e_dn ));
+ LDAP_LOG( OPERATION, DETAIL1, "entry_decode: %s\n", x->e_dn, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "<= entry_decode(%s)\n",
x->e_dn, 0, 0 );
LDAPControl **rspctrls;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_extended: conn %d\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ENTRY, "do_extended: conn %d\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_extended\n", 0, 0, 0 );
#endif
if( op->o_protocol < LDAP_VERSION3 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_extended: protocol version (%d) too low.\n",
- op->o_protocol ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_extended: protocol version (%d) too low.\n", op->o_protocol, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_extended: protocol version (%d) too low\n",
if ( ber_scanf( op->o_ber, "{m" /*}*/, &reqoid ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_extended: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR, "do_extended: conn %d ber_scanf failed\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_extended: ber_scanf failed\n", 0, 0 ,0 );
#endif
if( !(ext = find_extop(supp_ext_list, &reqoid)) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG( OPERATION, ERR,
"do_extended: conn %d unsupported operation \"%s\"\n",
- conn->c_connid, reqoid.bv_val ));
+ conn->c_connid, reqoid.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_extended: unsupported operation \"%s\"\n",
reqoid.bv_val, 0 ,0 );
if( ber_peek_tag( op->o_ber, &len ) == LDAP_TAG_EXOP_REQ_VALUE ) {
if( ber_scanf( op->o_ber, "m", &reqdata ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_extended: conn %d ber_scanf failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_extended: conn %d ber_scanf failed\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_extended: ber_scanf failed\n", 0, 0 ,0 );
#endif
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_extended: conn %d get_ctrls failed\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_extended: conn %d get_ctrls failed\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_extended: get_ctrls failed\n", 0, 0 ,0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_extended: conn %d oid=%d\n.", conn->c_connid, reqoid.bv_val ));
+ LDAP_LOG( OPERATION, DETAIL1,
+ "do_extended: conn %d oid=%d\n.", conn->c_connid, reqoid.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "do_extended: oid=%s\n", reqoid.bv_val, 0 ,0 );
#endif
Filter *f;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY, "get_filter: conn %d\n",
- conn->c_connid ));
+ LDAP_LOG( FILTER, ENTRY, "get_filter: conn %d\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "begin get_filter\n", 0, 0, 0 );
#endif
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL2,
- "get_filter: conn %d EQUALITY\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL2,
+ "get_filter: conn %d EQUALITY\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "EQUALITY\n", 0, 0, 0 );
#endif
case LDAP_FILTER_SUBSTRINGS:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d SUBSTRINGS\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_filter: conn %d SUBSTRINGS\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "SUBSTRINGS\n", 0, 0, 0 );
#endif
case LDAP_FILTER_GE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d GE\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_filter: conn %d GE\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "GE\n", 0, 0, 0 );
#endif
case LDAP_FILTER_LE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d LE\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_filter: conn %d LE\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "LE\n", 0, 0, 0 );
#endif
struct berval type;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d PRESENT\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_filter: conn %d PRESENT\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "PRESENT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_APPROX:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d APPROX\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_filter: conn %d APPROX\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "APPROX\n", 0, 0, 0 );
#endif
case LDAP_FILTER_AND:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d AND\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_filter: conn %d AND\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "AND\n", 0, 0, 0 );
#endif
case LDAP_FILTER_OR:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d OR\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_filter: conn %d OR\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "OR\n", 0, 0, 0 );
#endif
case LDAP_FILTER_NOT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d NOT\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_filter: conn %d NOT\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "NOT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_EXT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_filter: conn %d EXTENSIBLE\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_filter: conn %d EXTENSIBLE\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "EXTENSIBLE\n", 0, 0, 0 );
#endif
default:
(void) ber_scanf( ber, "x" ); /* skip the element */
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ LDAP_LOG( FILTER, ERR,
"get_filter: conn %d unknown filter type=%lu\n",
- conn->c_connid, f->f_choice ));
+ conn->c_connid, f->f_choice, 0 );
#else
Debug( LDAP_DEBUG_ANY, "get_filter: unknown filter type=%lu\n",
f->f_choice, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL2,
- "get_filter: conn %d exit\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL2,
+ "get_filter: conn %d exit\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "end get_filter %d\n", err, 0, 0 );
#endif
char *last;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_filter_list: conn %d start\n", conn->c_connid ));
+ LDAP_LOG( FILTER, ENTRY,
+ "get_filter_list: conn %d start\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "begin get_filter_list\n", 0, 0, 0 );
#endif
*new = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_filter_list: conn %d exit\n", conn->c_connid ));
+ LDAP_LOG( FILTER, ENTRY,
+ "get_filter_list: conn %d exit\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "end get_filter_list\n", 0, 0, 0 );
#endif
*text = "error decoding filter";
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_substring_filter: conn %d begin\n", conn->c_connid ));
+ LDAP_LOG( FILTER, ENTRY,
+ "get_substring_filter: conn %d begin\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "begin get_substring_filter\n", 0, 0, 0 );
#endif
rc = LDAP_PROTOCOL_ERROR;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ LDAP_LOG( FILTER, ERR,
"get_filter_substring: conn %d unknown substring choice=%ld\n",
- conn->c_connid, (long)tag ));
+ conn->c_connid, (long)tag, 0 );
#else
Debug( LDAP_DEBUG_FILTER,
" unknown substring choice=%ld\n",
switch ( tag ) {
case LDAP_SUBSTRING_INITIAL:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_substring_filter: conn %d INITIAL\n",
- conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_substring_filter: conn %d INITIAL\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " INITIAL\n", 0, 0, 0 );
#endif
case LDAP_SUBSTRING_ANY:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_substring_filter: conn %d ANY\n",
- conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_substring_filter: conn %d ANY\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " ANY\n", 0, 0, 0 );
#endif
case LDAP_SUBSTRING_FINAL:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_substring_filter: conn %d FINAL\n",
- conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_substring_filter: conn %d FINAL\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " FINAL\n", 0, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
+ LDAP_LOG( FILTER, INFO,
"get_substring_filter: conn %d unknown substring type %ld\n",
- conn->c_connid, (long)tag ));
+ conn->c_connid, (long)tag, 0 );
#else
Debug( LDAP_DEBUG_FILTER,
" unknown substring type=%ld\n",
return_error:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
+ LDAP_LOG( FILTER, INFO,
"get_substring_filter: conn %d error %ld\n",
- conn->c_connid, (long)rc ));
+ conn->c_connid, (long)rc, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " error=%ld\n",
(long) rc, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_substring_filter: conn %d exit\n", conn->c_connid ));
+ LDAP_LOG( FILTER, ENTRY,
+ "get_substring_filter: conn %d exit\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "end get_substring_filter\n", 0, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "filter_free: unknown filter type %lu\n", f->f_choice ));
+ LDAP_LOG( FILTER, ERR,
+ "filter_free: unknown filter type %lu\n", f->f_choice, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "filter_free: unknown filter type=%lu\n",
f->f_choice, 0, 0 );
ValuesReturnFilter *f;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY, "get_simple_vrFilter: conn %d\n",
- conn->c_connid ));
+ LDAP_LOG( FILTER, ENTRY,
+ "get_simple_vrFilter: conn %d\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "begin get_simple_vrFilter\n", 0, 0, 0 );
#endif
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL2,
- "get_simple_vrFilter: conn %d EQUALITY\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL2,
+ "get_simple_vrFilter: conn %d EQUALITY\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "EQUALITY\n", 0, 0, 0 );
#endif
case LDAP_FILTER_SUBSTRINGS:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_simple_vrFilter: conn %d SUBSTRINGS\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_simple_vrFilter: conn %d SUBSTRINGS\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "SUBSTRINGS\n", 0, 0, 0 );
#endif
case LDAP_FILTER_GE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_simple_vrFilter: conn %d GE\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_simple_vrFilter: conn %d GE\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "GE\n", 0, 0, 0 );
#endif
case LDAP_FILTER_LE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_simple_vrFilter: conn %d LE\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_simple_vrFilter: conn %d LE\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "LE\n", 0, 0, 0 );
#endif
struct berval type;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_simple_vrFilter: conn %d PRESENT\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_simple_vrFilter: conn %d PRESENT\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "PRESENT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_APPROX:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_simple_vrFilter: conn %d APPROX\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_simple_vrFilter: conn %d APPROX\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "APPROX\n", 0, 0, 0 );
#endif
case LDAP_FILTER_EXT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_simple_vrFilter: conn %d EXTENSIBLE\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_simple_vrFilter: conn %d EXTENSIBLE\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "EXTENSIBLE\n", 0, 0, 0 );
#endif
default:
(void) ber_scanf( ber, "x" ); /* skip the element */
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ LDAP_LOG( FILTER, ERR,
"get_simple_vrFilter: conn %d unknown filter type=%lu\n",
- conn->c_connid, f->f_choice ));
+ conn->c_connid, f->f_choice, 0 );
#else
Debug( LDAP_DEBUG_ANY, "get_simple_vrFilter: unknown filter type=%lu\n",
f->f_choice, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL2,
- "get_simple_vrFilter: conn %d exit\n", conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL2,
+ "get_simple_vrFilter: conn %d exit\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "end get_simple_vrFilter %d\n", err, 0, 0 );
#endif
char *last;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_vrFilter: conn %d start\n", conn->c_connid ));
+ LDAP_LOG( FILTER, ENTRY,
+ "get_vrFilter: conn %d start\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "begin get_vrFilter\n", 0, 0, 0 );
#endif
*new = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_vrFilter: conn %d exit\n", conn->c_connid ));
+ LDAP_LOG( FILTER, ENTRY,
+ "get_vrFilter: conn %d exit\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "end get_vrFilter\n", 0, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
- "filter_free: unknown filter type %lu\n", f->f_choice ));
+ LDAP_LOG( FILTER, ERR,
+ "filter_free: unknown filter type %lu\n", f->f_choice, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "filter_free: unknown filter type=%lu\n",
f->f_choice, 0, 0 );
*text = "error decoding filter";
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_substring_filter: conn %d begin\n", conn->c_connid ));
+ LDAP_LOG( FILTER, ENTRY,
+ "get_substring_filter: conn %d begin\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "begin get_substring_filter\n", 0, 0, 0 );
#endif
rc = LDAP_PROTOCOL_ERROR;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
+ LDAP_LOG( FILTER, ERR,
"get_filter_substring: conn %d unknown substring choice=%ld\n",
- conn->c_connid, (long)tag ));
+ conn->c_connid, (long)tag, 0 );
#else
Debug( LDAP_DEBUG_FILTER,
" unknown substring choice=%ld\n",
switch ( tag ) {
case LDAP_SUBSTRING_INITIAL:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_substring_filter: conn %d INITIAL\n",
- conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_substring_filter: conn %d INITIAL\n",
+ conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " INITIAL\n", 0, 0, 0 );
#endif
case LDAP_SUBSTRING_ANY:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_substring_filter: conn %d ANY\n",
- conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_substring_filter: conn %d ANY\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " ANY\n", 0, 0, 0 );
#endif
case LDAP_SUBSTRING_FINAL:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "get_substring_filter: conn %d FINAL\n",
- conn->c_connid ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "get_substring_filter: conn %d FINAL\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " FINAL\n", 0, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
+ LDAP_LOG( FILTER, INFO,
"get_substring_filter: conn %d unknown substring type %ld\n",
- conn->c_connid, (long)tag ));
+ conn->c_connid, (long)tag, 0 );
#else
Debug( LDAP_DEBUG_FILTER,
" unknown substring type=%ld\n",
return_error:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
+ LDAP_LOG( FILTER, INFO,
"get_substring_filter: conn %d error %ld\n",
- conn->c_connid, (long)rc ));
+ conn->c_connid, (long)rc, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " error=%ld\n",
(long) rc, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "get_substring_filter: conn %d exit\n", conn->c_connid ));
+ LDAP_LOG( FILTER, ENTRY,
+ "get_substring_filter: conn %d exit\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "end get_substring_filter\n", 0, 0, 0 );
#endif
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter: begin\n" ));
+ LDAP_LOG( FILTER, ENTRY, "test_filter: begin\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "=> test_filter\n", 0, 0, 0 );
#endif
switch ( f->f_choice ) {
case SLAPD_FILTER_COMPUTED:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: COMPUTED %s (%d)\n",
- f->f_result == LDAP_COMPARE_FALSE ? "false" :
- f->f_result == LDAP_COMPARE_TRUE ? "true" :
- f->f_result == SLAPD_COMPARE_UNDEFINED ? "undefined" :
- "error",
- f->f_result ));
+ LDAP_LOG( FILTER, DETAIL1,
+ "test_filter: COMPUTED %s (%d)\n",
+ f->f_result == LDAP_COMPARE_FALSE ? "false" :
+ f->f_result == LDAP_COMPARE_TRUE ? "true" :
+ f->f_result == SLAPD_COMPARE_UNDEFINED ? "undefined" :
+ "error", f->f_result, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " COMPUTED %s (%d)\n",
f->f_result == LDAP_COMPARE_FALSE ? "false" :
case LDAP_FILTER_EQUALITY:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: EQUALITY\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_filter: EQUALITY\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " EQUALITY\n", 0, 0, 0 );
#endif
case LDAP_FILTER_SUBSTRINGS:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter SUBSTRINGS\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_filter SUBSTRINGS\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " SUBSTRINGS\n", 0, 0, 0 );
#endif
case LDAP_FILTER_PRESENT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: PRESENT\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_filter: PRESENT\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " PRESENT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_APPROX:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: APPROX\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_filter: APPROX\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " APPROX\n", 0, 0, 0 );
#endif
case LDAP_FILTER_AND:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: AND\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_filter: AND\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " AND\n", 0, 0, 0 );
#endif
case LDAP_FILTER_OR:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: OR\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_filter: OR\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " OR\n", 0, 0, 0 );
#endif
case LDAP_FILTER_NOT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: NOT\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_filter: NOT\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " NOT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_EXT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_filter: EXT\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_filter: EXT\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " EXT\n", 0, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "test_filter: unknown filter type %lu\n",
- f->f_choice ));
+ LDAP_LOG( FILTER, INFO,
+ "test_filter: unknown filter type %lu\n", f->f_choice, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " unknown filter type %lu\n",
f->f_choice, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter: return=%d\n", rc ));
+ LDAP_LOG( FILTER, RESULTS, "test_filter: return=%d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "<= test_filter %d\n", rc, 0, 0 );
#endif
int rtn = LDAP_COMPARE_TRUE; /* True if empty */
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter_and: begin\n" ));
+ LDAP_LOG( FILTER, ENTRY, "test_filter_and: begin\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "=> test_filter_and\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter_and: rc=%d\n", rtn ));
+ LDAP_LOG( FILTER, RESULTS, "test_filter_and: rc=%d\n", rtn, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "<= test_filter_and %d\n", rtn, 0, 0 );
#endif
int rtn = LDAP_COMPARE_FALSE; /* False if empty */
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter_or: begin\n" ));
+ LDAP_LOG( FILTER, ENTRY, "test_filter_or: begin\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "=> test_filter_or\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_filter_or: result=%d\n", rtn ));
+ LDAP_LOG( FILTER, ENTRY, "test_filter_or: result=%d\n", rtn, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "<= test_filter_or %d\n", rtn, 0, 0 );
#endif
Attribute *a;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_substrings_filter: begin\n" ));
+ LDAP_LOG( FILTER, ENTRY, "test_substrings_filter: begin\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "begin test_substrings_filter\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "test_substrings_filter: return FALSE\n" ));
+ LDAP_LOG( FILTER, ENTRY, "test_substrings_filter: return FALSE\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "end test_substrings_filter 1\n", 0, 0, 0 );
#endif
if( slapMode != SLAP_UNDEFINED_MODE ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "init: %s init called twice (old=%d, new=%d)\n",
- name, slapMode, mode ));
+ LDAP_LOG( OPERATION, CRIT,
+ "init: %s init called twice (old=%d, new=%d)\n",
+ name, slapMode, mode );
#else
Debug( LDAP_DEBUG_ANY,
"%s init: init called twice (old=%d, new=%d)\n",
case SLAP_SERVER_MODE:
case SLAP_TOOL_MODE:
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "init: %s initiation, initiated %s.\n",
- name, (mode & SLAP_MODE) == SLAP_TOOL_MODE ? "tool" : "server" ));
+ LDAP_LOG( OPERATION, DETAIL1,
+ "init: %s initiation, initiated %s.\n",
+ name, (mode & SLAP_MODE) == SLAP_TOOL_MODE ?
+ "tool" : "server", 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"%s init: initiated %s.\n", name,
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "init: %s init, undefined mode (%d).\n", name, mode ));
+ LDAP_LOG( OPERATION, ERR,
+ "init: %s init, undefined mode (%d).\n", name, mode, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s init: undefined mode (%d).\n", name, mode, 0 );
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "slap_startup: %s started\n", slap_name ));
+ LDAP_LOG( OPERATION, CRIT, "slap_startup: %s started\n", slap_name, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"%s startup: initiated.\n",
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "slap_shutdown: %s shutdown initiated.\n", slap_name));
+ LDAP_LOG( OPERATION, CRIT,
+ "slap_shutdown: %s shutdown initiated.\n", slap_name, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"%s shutdown: initiated\n",
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_destroy: %s freeing system resources.\n",
- slap_name ));
+ LDAP_LOG( OPERATION, INFO,
+ "slap_destroy: %s freeing system resources.\n", slap_name, 0, 0);
#else
Debug( LDAP_DEBUG_TRACE,
"%s shutdown: freeing system resources.\n",
if ( argc < 3 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s : line %d: missing arg(s) in "
- "\"limits <pattern> <limits>\" line.\n",
- fname, lineno ));
+ "\"limits <pattern> <limits>\" line.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s : line %d: missing arg(s) in "
default:
if ( pattern[0] != '=' ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s : line %d: missing '=' in "
"\"dn[.{exact|base|one|subtree"
- "|children|regex|anonymous}]"
- "=<pattern>\" in "
- "\"limits <pattern> <limits>\" line.\n",
- fname, lineno ));
+ "|children|regex|anonymous}]" "=<pattern>\" in "
+ "\"limits <pattern> <limits>\" line.\n", fname, lineno, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s : line %d: missing '=' in "
if ( parse_limit( argv[i], &limit ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s : line %d: unknown limit type \"%s\" in "
"\"limits <pattern> <limits>\" line.\n",
- fname, lineno, argv[i] ));
+ fname, lineno, argv[i] );
#else
Debug( LDAP_DEBUG_ANY,
"%s : line %d: unknown limit type \"%s\" in "
strcpy(slap_strcopy( buf, fname ), ".lock" );
if ( (*lfp = fopen( buf, "w" )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "lock_fopen: could not open lock file \"%s\".\n", buf ));
+ LDAP_LOG( OPERATION, ERR,
+ "lock_fopen: could not open lock file \"%s\".\n", buf, 0, 0);
#else
Debug( LDAP_DEBUG_ANY, "could not open \"%s\"\n", buf, 0, 0 );
#endif
/* open the log file */
if ( (fp = fopen( fname, type )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "lock_fopen: could not open log file \"%s\".\n", buf ));
+ LDAP_LOG( OPERATION, ERR,
+ "lock_fopen: could not open log file \"%s\".\n", buf, 0, 0);
#else
Debug( LDAP_DEBUG_ANY, "could not open \"%s\"\n", fname, 0, 0 );
#endif
{
slap_debug = *i;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "main: new debug level from registry is: %d\n", slap_debug ));
+ lutil_log_initialize( argc, argv );
+ LDAP_LOG( SLAPD, INFO,
+ "main: new debug level from registry is: %d\n",
+ slap_debug, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "new debug level from registry is: %d\n", slap_debug, 0, 0 );
#endif
urls = ch_strdup(newUrls);
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "main: new urls from registry: %s\n", urls ));
+ LDAP_LOG( SLAPD, INFO,
+ "main: new urls from registry: %s\n", urls, 0, 0 );
#else
Debug(LDAP_DEBUG_ANY, "new urls from registry: %s\n",
urls, 0, 0);
{
configfile = newConfigFile;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "main: new config file from registry is: %s\n", configfile ));
+ LDAP_LOG( SLAPD, INFO,
+ "main: new config file from registry is: %s\n", configfile, 0, 0 );
#else
Debug ( LDAP_DEBUG_ANY, "new config file from registry is: %s\n", configfile, 0, 0 );
#endif
#ifdef NEW_LOGGING
lutil_log_initialize( argc, argv );
-#endif
-
+#else
lutil_set_debug_level( "slapd", slap_debug );
ber_set_option(NULL, LBER_OPT_DEBUG_LEVEL, &slap_debug);
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &slap_debug);
ldif_debug = slap_debug;
+#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "%s", Versionstr ));
+ LDAP_LOG( SLAPD, INFO, "%s", Versionstr, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "%s", Versionstr, 0, 0 );
#endif
if ( slap_schema_init( ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "main: schema initialization error\n" ));
+ LDAP_LOG( OPERATION, CRIT, "main: schema initialization error\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"schema initialization error\n",
if ( glue_sub_init( ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "main: subordinate config error\n"));
+ LDAP_LOG( SLAPD, CRIT, "main: subordinate config error\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"subordinate config error\n",
if ( slap_schema_check( ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "main: schema prep error\n"));
+ LDAP_LOG( SLAPD, CRIT, "main: schema prep error\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"schema prep error\n",
rc = ldap_pvt_tls_init();
if( rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "main: tls init failed: %d\n", rc ));
+ LDAP_LOG( SLAPD, CRIT, "main: tls init failed: %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"main: TLS init failed: %d\n",
rc = ldap_pvt_tls_init_def_ctx();
if( rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "main: tls init def ctx failed: %d\n", rc ));
+ LDAP_LOG( SLAPD, CRIT, "main: tls init def ctx failed: %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"main: TLS init def ctx failed: %d\n",
FILE *fp;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "main: slapd starting.\n" ));
+ LDAP_LOG( SLAPD, INFO, "main: slapd starting.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "slapd starting\n", 0, 0, 0 );
#endif
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
- "main: slapd stopped.\n" ));
+ LDAP_LOG( SLAPD, CRIT, "main: slapd stopped.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "slapd stopped.\n", 0, 0, 0 );
#endif
int rc = LDAP_SUCCESS;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "filter_matched_values: begin\n" ));
+ LDAP_LOG( FILTER, ENTRY, "filter_matched_values: begin\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "=> filter_matched_values\n", 0, 0, 0 );
#endif
switch ( f->f_choice ) {
case SLAPD_FILTER_COMPUTED:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( FILTER, DETAIL1,
"test_vrFilter: COMPUTED %s (%d)\n",
f->f_result == LDAP_COMPARE_FALSE ? "false" :
f->f_result == LDAP_COMPARE_TRUE ? "true" :
f->f_result == SLAPD_COMPARE_UNDEFINED ? "undefined" :
- "error",
- f->f_result ));
+ "error", f->f_result, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " COMPUTED %s (%d)\n",
f->f_result == LDAP_COMPARE_FALSE ? "false" :
case LDAP_FILTER_EQUALITY:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_vrFilter: EQUALITY\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_vrFilter: EQUALITY\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " EQUALITY\n", 0, 0, 0 );
#endif
case LDAP_FILTER_SUBSTRINGS:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_vrFilter SUBSTRINGS\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_vrFilter SUBSTRINGS\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " SUBSTRINGS\n", 0, 0, 0 );
#endif
case LDAP_FILTER_PRESENT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_vrFilter: PRESENT\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_vrFilter: PRESENT\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " PRESENT\n", 0, 0, 0 );
#endif
case LDAP_FILTER_EXT:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
- "test_vrFilter: EXT\n" ));
+ LDAP_LOG( FILTER, DETAIL1, "test_vrFilter: EXT\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, " EXT\n", 0, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_INFO,
- "test_vrFilter: unknown filter type %lu\n",
- f->f_choice ));
+ LDAP_LOG( FILTER, INFO,
+ "test_vrFilter: unknown filter type %lu\n", f->f_choice, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " unknown filter type %lu\n",
f->f_choice, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "filter_matched_values: return=%d\n", rc ));
+ LDAP_LOG( FILTER, ENTRY, "filter_matched_values: return=%d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "<= filter_matched_values %d\n", rc, 0, 0 );
#endif
int manageDSAit;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_modify: enter\n" ));
+ LDAP_LOG( OPERATION, ENTRY, "do_modify: enter\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_modify\n", 0, 0, 0 );
#endif
if ( ber_scanf( op->o_ber, "{m" /*}*/, &dn ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: ber_scanf failed\n" ));
+ LDAP_LOG( OPERATION, ERR, "do_modify: ber_scanf failed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modify: ber_scanf failed\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_modify: dn (%s)\n", dn.bv_val ));
+ LDAP_LOG( OPERATION, ARGS, "do_modify: dn (%s)\n", dn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "do_modify: dn (%s)\n", dn.bv_val, 0, 0 );
#endif
case LDAP_MOD_ADD:
if ( mod->sml_bvalues == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG( OPERATION, ERR,
"do_modify: modify/add operation (%ld) requires values\n",
- (long)mop ));
+ (long)mop, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_modify: modify/add operation (%ld) requires values\n",
default: {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: invalid modify operation (%ld)\n",
- (long)mop ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_modify: invalid modify operation (%ld)\n", (long)mop, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_modify: invalid modify operation (%ld)\n",
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: get_ctrls failed\n" ));
+ LDAP_LOG( OPERATION, ERR, "do_modify: get_ctrls failed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modify: get_ctrls failed\n", 0, 0, 0 );
#endif
rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_modify: conn %d invalid dn (%s)\n",
- conn->c_connid, dn.bv_val ));
+ LDAP_LOG( OPERATION, INFO, "do_modify: conn %d invalid dn (%s)\n",
+ conn->c_connid, dn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_modify: invalid dn (%s)\n", dn.bv_val, 0, 0 );
if( ndn.bv_len == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: attempt to modify root DSE.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_modify: attempt to modify root DSE.\n",0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modify: root dse!\n", 0, 0, 0 );
#endif
#if defined( SLAPD_SCHEMA_DN )
} else if ( strcasecmp( ndn.bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modify: attempt to modify subschema subentry.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_modify: attempt to modify subschema subentry.\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modify: subschema subentry!\n", 0, 0, 0 );
#endif
#ifdef LDAP_DEBUG
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "do_modify: modifications:\n" ));
+ LDAP_LOG( OPERATION, DETAIL1, "do_modify: modifications:\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "modifications:\n", 0, 0, 0 );
#endif
for ( tmp = modlist; tmp != NULL; tmp = tmp->sml_next ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "\t%s: %s\n", tmp->sml_op == LDAP_MOD_ADD ?
- "add" : (tmp->sml_op == LDAP_MOD_DELETE ?
- "delete" : "replace"), tmp->sml_type.bv_val ));
+ LDAP_LOG( OPERATION, DETAIL1, "\t%s: %s\n",
+ tmp->sml_op == LDAP_MOD_ADD ?
+ "add" : (tmp->sml_op == LDAP_MOD_DELETE ?
+ "delete" : "replace"), tmp->sml_type.bv_val, 0 );
if ( tmp->sml_bvalues == NULL ) {
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "\t\tno values" ));
+ LDAP_LOG( OPERATION, DETAIL1, "\t\tno values", 0, 0, 0 );
} else if ( tmp->sml_bvalues[0].bv_val == NULL ) {
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "\t\tzero values" ));
+ LDAP_LOG( OPERATION, DETAIL1, "\t\tzero values", 0, 0, 0 );
} else if ( tmp->sml_bvalues[1].bv_val == NULL ) {
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "\t\tone value" ));
+ LDAP_LOG( OPERATION, DETAIL1, "\t\tone value", 0, 0, 0 );
} else {
- LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "\t\tmultiple values" ));
+ LDAP_LOG( OPERATION, DETAIL1, "\t\tmultiple values", 0, 0, 0 );
}
#else
int manageDSAit;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_modrdn: begin\n" ));
+ LDAP_LOG( OPERATION, ENTRY, "do_modrdn: begin\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_modrdn\n", 0, 0, 0 );
#endif
== LBER_ERROR )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: ber_scanf failed\n" ));
+ LDAP_LOG( OPERATION, ERR, "do_modrdn: ber_scanf failed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_scanf failed\n", 0, 0, 0 );
#endif
* newSuperior is present: report error.
*/
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: (v2) invalid field newSuperior.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_modrdn: (v2) invalid field newSuperior.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"modrdn(v2): invalid field newSuperior!\n",
== LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: ber_scanf(\"m\") failed\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_modrdn: ber_scanf(\"m\") failed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_scanf(\"m\") failed\n",
0, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ LDAP_LOG( OPERATION, ARGS,
"do_modrdn: dn (%s) newrdn (%s) newsuperior(%s)\n",
dn.bv_val, newrdn.bv_val,
- newSuperior.bv_len ? newSuperior.bv_val : "" ));
+ newSuperior.bv_len ? newSuperior.bv_val : "" );
#else
Debug( LDAP_DEBUG_ARGS,
"do_modrdn: dn (%s) newrdn (%s) newsuperior (%s)\n",
if ( ber_scanf( op->o_ber, /*{*/ "}") == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: ber_scanf failed\n" ));
+ LDAP_LOG( OPERATION, ERR, "do_modrdn: ber_scanf failed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: ber_scanf failed\n", 0, 0, 0 );
#endif
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: get_ctrls failed\n" ));
+ LDAP_LOG( OPERATION, ERR, "do_modrdn: get_ctrls failed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: get_ctrls failed\n", 0, 0, 0 );
#endif
rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_modrdn: conn %d invalid dn (%s)\n",
- conn->c_connid, dn.bv_val ));
+ conn->c_connid, dn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_modrdn: invalid dn (%s)\n", dn.bv_val, 0, 0 );
if( ndn.bv_len == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: attempt to modify root DSE.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_modrdn: attempt to modify root DSE.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: root dse!\n", 0, 0, 0 );
#endif
#ifdef SLAPD_SCHEMA_DN
} else if ( strcasecmp( ndn.bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: attempt to modify subschema subentry\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_modrdn: attempt to modify subschema subentry\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: subschema subentry!\n", 0, 0, 0 );
#endif
rc = dnPrettyNormal( NULL, &newrdn, &pnewrdn, &nnewrdn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_modrdn: conn %d invalid newrdn (%s)\n",
- conn->c_connid, newrdn.bv_val ));
+ conn->c_connid, newrdn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_modrdn: invalid newrdn (%s)\n", newrdn.bv_val, 0, 0 );
if( rdnValidate( &pnewrdn ) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "do_modrdn: invalid rdn (%s).\n", pnewrdn.bv_val ));
+ LDAP_LOG( OPERATION, ERR,
+ "do_modrdn: invalid rdn (%s).\n", pnewrdn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: invalid rdn (%s)\n",
pnewrdn.bv_val, 0, 0 );
&nnewSuperior );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_modrdn: conn %d invalid newSuperior (%s)\n",
- conn->c_connid, newSuperior.bv_val ));
+ conn->c_connid, newSuperior.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_modrdn: invalid newSuperior (%s)\n",
if (lt_dlinit()) {
const char *error = lt_dlerror();
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
- "module_init: lt_ldinit failed: %s\n", error ));
+ LDAP_LOG( SLAPD, CRIT,
+ "module_init: lt_ldinit failed: %s\n", error, 0, 0 );
#else
Debug(LDAP_DEBUG_ANY, "lt_dlinit failed: %s\n", error, 0, 0);
#endif
if (lt_dlexit()) {
const char *error = lt_dlerror();
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
- "module_kill: lt_dlexit failed: %s\n", error ));
+ LDAP_LOG( SLAPD, CRIT, "module_kill: lt_dlexit failed: %s\n",
+ error, 0, 0 );
#else
Debug(LDAP_DEBUG_ANY, "lt_dlexit failed: %s\n", error, 0, 0);
#endif
module = (module_loaded_t *)ch_calloc(1, sizeof(module_loaded_t));
if (module == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
- "module_load: (%s) out of memory.\n", file_name ));
+ LDAP_LOG( SLAPD, CRIT,
+ "module_load: (%s) out of memory.\n", file_name, 0, 0 );
#else
Debug(LDAP_DEBUG_ANY, "module_load failed: (%s) out of memory\n", file_name,
0, 0);
if ((module->lib = lt_dlopen(file_name)) == NULL) {
error = lt_dlerror();
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_CRIT,
- "module_load: lt_dlopen failed: (%s) %s.\n",
- file_name, error ));
+ LDAP_LOG( SLAPD, CRIT,
+ "module_load: lt_dlopen failed: (%s) %s.\n",
+ file_name, error, 0 );
#else
Debug(LDAP_DEBUG_ANY, "lt_dlopen failed: (%s) %s\n", file_name,
error, 0);
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_INFO,
- "module_load: loaded module %s\n", file_name ));
+ LDAP_LOG( SLAPD, INFO, "module_load: loaded module %s\n", file_name, 0, 0 );
#else
Debug(LDAP_DEBUG_CONFIG, "loaded module %s\n", file_name, 0, 0);
#endif
if ((initialize = lt_dlsym(module->lib, "init_module")) == NULL) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_ERR,
- "module_load: module %s : no init_module() function found\n",
- file_name ));
+ LDAP_LOG( SLAPD, ERR,
+ "module_load: module %s : no init_module() function found\n",
+ file_name, 0, 0 );
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: no init_module() function found\n",
file_name, 0, 0);
rc = initialize(argc, argv);
if (rc == -1) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_ERR,
- "module_load: module %s init_module() failed\n", file_name));
+ LDAP_LOG( SLAPD, ERR,
+ "module_load: module %s init_module() failed\n", file_name, 0, 0);
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: init_module() failed\n",
file_name, 0, 0);
|| module_regtable[rc].proc == NULL)
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_ERR,
- "module_load: module %s: unknown registration type (%d).\n", file_name));
+ LDAP_LOG( SLAPD, ERR,
+ "module_load: module %s: unknown registration type (%d).\n",
+ file_name, 0);
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: unknown registration type (%d)\n",
file_name, rc, 0);
rc = (module_regtable[rc].proc)(module, file_name);
if (rc != 0) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_ERR,
- "module_load: module %s:%s could not be registered.\n",
- file_name, module_regtable[rc].type ));
+ LDAP_LOG( SLAPD, ERR,
+ "module_load: module %s:%s could not be registered.\n",
+ file_name, module_regtable[rc].type, 0 );
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: %s module could not be registered\n",
file_name, module_regtable[rc].type, 0);
module_list = module;
#ifdef NEW_LOGGING
- LDAP_LOG(( "module", LDAP_LEVEL_INFO,
- "module_load: module %s:%s registered\n", file_name,
- module_regtable[rc].type ));
+ LDAP_LOG( SLAPD, INFO,
+ "module_load: module %s:%s registered\n", file_name,
+ module_regtable[rc].type, 0 );
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: %s module registered\n",
file_name, module_regtable[rc].type, 0);
#include "slap.h"
#include "ldap_pvt.h"
-
struct mindexrec {
struct berval mir_name;
MatchingRule *mir_mr;
if( usage == SLAP_MR_NONE ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "register_matching_rule: %s not usable\n", desc ));
+ LDAP_LOG( OPERATION, ERR,
+ "register_matching_rule: %s not usable\n", desc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "register_matching_rule: not usable %s\n",
desc, 0, 0 );
if( amr == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "register_matching_rule: could not locate associated matching rule %s for %s\n",
- associated, desc ));
+ LDAP_LOG( OPERATION, ERR,
+ "register_matching_rule: could not locate associated "
+ "matching rule %s for %s\n", associated, desc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "register_matching_rule: could not locate "
"associated matching rule %s for %s\n",
mr = ldap_str2matchingrule( desc, &code, &err, LDAP_SCHEMA_ALLOW_ALL);
if ( !mr ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "register_matching_rule: %s before %s in %s.\n",
- ldap_scherr2str(code), err, desc ));
+ LDAP_LOG( OPERATION, ERR,
+ "register_matching_rule: %s before %s in %s.\n",
+ ldap_scherr2str(code), err, desc );
#else
Debug( LDAP_DEBUG_ANY, "Error in register_matching_rule: %s before %s in %s\n",
ldap_scherr2str(code), err, desc );
if ( code ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "register_matching_rule: %s for %s in %s.\n",
- scherr2str(code), err, desc ));
+ LDAP_LOG( OPERATION, ERR,
+ "register_matching_rule: %s for %s in %s.\n",
+ scherr2str(code), err, desc );
#else
Debug( LDAP_DEBUG_ANY, "Error in register_matching_rule: %s for %s in %s\n",
scherr2str(code), err, desc );
#include "slap.h"
-
void
mra_free(
MatchingRuleAssertion *mra,
if( rtag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf (\"{t\") failure\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "get_mra: ber_scanf (\"{t\") failure\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf\n", 0, 0, 0 );
#endif
rtag = ber_scanf( ber, "m", &ma->ma_rule_text );
if ( rtag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf(\"o\") failure.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "get_mra: ber_scanf(\"o\") failure.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf for mr\n", 0, 0, 0 );
#endif
rtag = ber_scanf( ber, "t", &tag );
if( rtag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf (\"t\") failure\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "get_mra: ber_scanf (\"t\") failure\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf\n", 0, 0, 0 );
#endif
rtag = ber_scanf( ber, "m", &type );
if ( rtag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf (\"o\") failure.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "get_mra: ber_scanf (\"o\") failure.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf for ad\n", 0, 0, 0 );
#endif
rtag = ber_scanf( ber, "t", &tag );
if( rtag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf (\"t\") failure.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "get_mra: ber_scanf (\"t\") failure.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf\n", 0, 0, 0 );
#endif
if ( tag != LDAP_FILTER_EXT_VALUE ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf missing value\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "get_mra: ber_scanf missing value\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf missing value\n", 0, 0, 0 );
#endif
if( rtag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf (\"o\") failure.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "get_mra: ber_scanf (\"o\") failure.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf\n", 0, 0, 0 );
#endif
if( rtag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "get_mra: ber_scanf failure\n"));
+ LDAP_LOG( OPERATION, ERR, "get_mra: ber_scanf failure\n", 0, 0, 0);
#else
Debug( LDAP_DEBUG_ANY, " get_mra ber_scanf\n", 0, 0, 0 );
#endif
if( sub == NULL || sup == NULL ) return 0;
#if 1
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, ARGS,
+ "is_object_subclass(%s,%s) %d\n",
+ sup->soc_oid, sub->soc_oid, sup == sub );
+#else
Debug( LDAP_DEBUG_TRACE, "is_object_subclass(%s,%s) %d\n",
sup->soc_oid, sub->soc_oid, sup == sub );
+#endif
#endif
if( sup == sub ) {
if( attr == NULL ) {
/* no objectClass attribute */
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR, "is_entry_objectclass: "
- "dn(%s), oid (%s), no objectClass attribute.\n",
- e->e_dn == NULL ? "" : e->e_dn,
- oc->soc_oclass.oc_oid ));
+ LDAP_LOG( OPERATION, ERR,
+ "is_entry_objectclass: dn(%s), oid (%s), no objectClass "
+ "attribute.\n", e->e_dn == NULL ? "" : e->e_dn,
+ oc->soc_oclass.oc_oid, 0 );
#else
Debug( LDAP_DEBUG_ANY, "is_entry_objectclass(\"%s\", \"%s\") "
"no objectClass attribute\n",
if( tag == LDAP_TAG_EXOP_MODIFY_PASSWD_ID ) {
if( id == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: ID not allowed.\n"));
+ LDAP_LOG( OPERATION, ERR,
+ "slap_passwd_parse: ID not allowed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: ID not allowed.\n",
0, 0, 0 );
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: ID parse failed.\n"));
+ LDAP_LOG( OPERATION, ERR,
+ "slap_passwd_parse: ID parse failed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: ID parse failed.\n",
0, 0, 0 );
if( tag == LDAP_TAG_EXOP_MODIFY_PASSWD_OLD ) {
if( oldpass == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: OLD not allowed.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "slap_passwd_parse: OLD not allowed.\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: OLD not allowed.\n",
0, 0, 0 );
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: ID parse failed.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "slap_passwd_parse: ID parse failed.\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: ID parse failed.\n",
0, 0, 0 );
if( tag == LDAP_TAG_EXOP_MODIFY_PASSWD_NEW ) {
if( newpass == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: NEW not allowed.\n" ));
+ LDAP_LOG( OPERATION, ERR,
+ "slap_passwd_parse: NEW not allowed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: NEW not allowed.\n",
0, 0, 0 );
if( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: OLD parse failed.\n"));
+ LDAP_LOG( OPERATION, ERR,
+ "slap_passwd_parse: OLD parse failed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: OLD parse failed.\n",
0, 0, 0 );
if( len != 0 ) {
decoding_error:
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "slap_passwd_parse: decoding error, len=%ld\n", (long)len ));
+ LDAP_LOG( OPERATION, ERR,
+ "slap_passwd_parse: decoding error, len=%ld\n", (long)len, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"slap_passwd_parse: decoding error, len=%ld\n",
assert( cred != NULL );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "slap_passwd_return: %ld\n",(long)cred->bv_len ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "slap_passwd_return: %ld\n",(long)cred->bv_len, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_return: %ld\n",
(long) cred->bv_len, 0, 0 );
{
struct berval *tmp;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "slap_passwd_generate: begin\n" ));
+ LDAP_LOG( OPERATION, ENTRY, "slap_passwd_generate: begin\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_passwd_generate\n", 0, 0, 0 );
#endif
default:
/* other error, bail */
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"referral: invalid URL (%s): %s (%d)\n",
- url, "" /* ldap_url_error2str(rc) */, rc ));
+ url, "" /* ldap_url_error2str(rc) */, rc );
#else
Debug( LDAP_DEBUG_ANY,
"referral: invalid URL (%s): %s (%d)\n",
if( lurl->lud_dn && *lurl->lud_dn ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "referral: URL (%s): contains DN\n",
- url ));
+ LDAP_LOG( CONFIG, CRIT, "referral: URL (%s): contains DN\n", url, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"referral: URL (%s): contains DN\n",
} else if( lurl->lud_attrs ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "referral: URL (%s): requests attributes\n",
- url ));
+ LDAP_LOG( CONFIG, CRIT,
+ "referral: URL (%s): requests attributes\n", url, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"referral: URL (%s): requests attributes\n",
} else if( lurl->lud_scope != LDAP_SCOPE_DEFAULT ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "referral: URL (%s): contains explicit scope\n",
- url ));
+ LDAP_LOG( CONFIG, CRIT,
+ "referral: URL (%s): contains explicit scope\n", url, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"referral: URL (%s): contains explicit scope\n",
} else if( lurl->lud_filter ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
- "referral: URL (%s): contains explicit filter\n",
- url ));
+ LDAP_LOG( CONFIG, CRIT,
+ "referral: URL (%s): contains explicit filter\n", url, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"referral: URL (%s): contains explicit filter\n",
*/
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_ldap_ber: conn %lu ber_flush failed err=%d (%s)\n",
- conn ? conn->c_connid : 0, err, sock_errstr(err) ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_ldap_ber: conn %lu ber_flush failed err=%d (%s)\n",
+ conn ? conn->c_connid : 0, err, sock_errstr(err) );
#else
Debug( LDAP_DEBUG_CONNS, "ber_flush failed errno=%d reason=\"%s\"\n",
err, sock_errstr(err), 0 );
ber_init_w_nullc( ber, LBER_USE_DER );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_ldap_response: conn %lu msgid=%d tag=%lu err=%d\n",
- conn ? conn->c_connid : 0, msgid, tag, err ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "send_ldap_response: msgid=%d tag=%lu err=%d\n",
+ msgid, tag, err );
#else
Debug( LDAP_DEBUG_TRACE,
"send_ldap_response: msgid=%d tag=%lu err=%d\n",
if( ref ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "send_ldap_response: conn %lu ref=\"%s\"\n",
- conn ? conn->c_connid : 0,
- ref[0].bv_val ? ref[0].bv_val : "NULL" ));
+ LDAP_LOG( OPERATION, ARGS,
+ "send_ldap_response: conn %lu ref=\"%s\"\n",
+ conn ? conn->c_connid : 0,
+ ref[0].bv_val ? ref[0].bv_val : "NULL" , 0 );
#else
Debug( LDAP_DEBUG_ARGS, "send_ldap_response: ref=\"%s\"\n",
ref[0].bv_val ? ref[0].bv_val : "NULL",
rc = ber_write(ber, (char *)&op->o_peeraddr, sizeof(struct sockaddr), 0);
if (rc != sizeof(struct sockaddr)) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_ldap_response: conn %lu ber_write failed\n",
- conn ? conn->c_connid : 0 ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_ldap_response: conn %lu ber_write failed\n",
+ conn ? conn->c_connid : 0 , 0, 0);
#else
Debug( LDAP_DEBUG_ANY, "ber_write failed\n", 0, 0, 0 );
#endif
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_ldap_response: conn %lu ber_printf failed\n",
- conn ? conn->c_connid : 0 ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_ldap_response: conn %lu ber_printf failed\n",
+ conn ? conn->c_connid : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
if ( bytes < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_ldap_response: conn %lu ber write failed\n",
- conn ? conn->c_connid : 0 ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_ldap_response: conn %lu ber write failed\n",
+ conn ? conn->c_connid : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"send_ldap_response: ber write failed\n",
assert( LDAP_UNSOLICITED_ERROR( err ) );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_ldap_disconnect: conn %lu %d:%s\n",
- conn ? conn->c_connid : 0, err, text ? text : "" ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "send_ldap_disconnect: conn %lu %d:%s\n",
+ conn ? conn->c_connid : 0, err, text ? text : "" );
#else
Debug( LDAP_DEBUG_TRACE,
"send_ldap_disconnect %d:%s\n",
assert( !LDAP_API_ERROR( err ) );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_ldap_result : conn %lu op=%lu p=%d\n",
- op->o_connid, op->o_opid, op->o_protocol ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "send_ldap_result : conn %lu op=%lu p=%d\n",
+ op->o_connid, op->o_opid, op->o_protocol );
#else
Debug( LDAP_DEBUG_TRACE,
"send_ldap_result: conn=%lu op=%lu p=%d\n",
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "send_ldap_result: conn=%lu err=%d matched=\"%s\" text=\"%s\"\n",
- op->o_connid, err, matched ? matched : "", text ? text : "" ));
+ LDAP_LOG( OPERATION, ARGS,
+ "send_ldap_result: err=%d matched=\"%s\" text=\"%s\"\n",
+ err, matched ? matched : "", text ? text : "" );
#else
Debug( LDAP_DEBUG_ARGS,
"send_ldap_result: err=%d matched=\"%s\" text=\"%s\"\n",
if( ref ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
+ LDAP_LOG( OPERATION, ARGS,
"send_ldap_result: referral=\"%s\"\n",
- ref[0].bv_val ? ref[0].bv_val : "NULL" ));
+ ref[0].bv_val ? ref[0].bv_val : "NULL", 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"send_ldap_result: referral=\"%s\"\n",
ber_int_t msgid;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_ldap_sasl: conn %lu err=%d len=%lu\n",
- op->o_connid, err, cred ? cred->bv_len : -1 ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "send_ldap_sasl: conn %lu err=%d len=%lu\n",
+ op->o_connid, err, cred ? cred->bv_len : -1 );
#else
Debug( LDAP_DEBUG_TRACE, "send_ldap_sasl: err=%d len=%ld\n",
err, cred ? (long) cred->bv_len : -1, NULL );
ber_int_t msgid;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_ldap_extended: conn %lu err=%d oid=%s len=%ld\n",
- op->o_connid, err, rspoid ? rspoid : "",
- rspdata != NULL ? rspdata->bv_len : 0 ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "send_ldap_extended: err=%d oid=%s len=%ld\n",
+ err, rspoid ? rspoid : "",
+ rspdata != NULL ? rspdata->bv_len : 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"send_ldap_extended err=%d oid=%s len=%ld\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_search_result: conn %lu err=%d "
- "matched=\"%s\" text=\"%s\"\n",
- op->o_connid, err, matched ? matched : "",
- text ? text : "" ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "send_search_result: err=%d matched=\"%s\" text=\"%s\"\n",
+ err, matched ? matched : "", text ? text : "" );
#else
Debug( LDAP_DEBUG_TRACE,
"send_search_result: err=%d matched=\"%s\" text=\"%s\"\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_search_entry: conn %lu dn=\"%s\"%s\n",
- op->o_connid, e->e_dn,
- attrsonly ? " (attrsOnly)" : "" ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "send_search_entry: conn %lu dn=\"%s\"%s\n",
+ op->o_connid, e->e_dn, attrsonly ? " (attrsOnly)" : "" );
#else
Debug( LDAP_DEBUG_TRACE,
"=> send_search_entry: dn=\"%s\"%s\n",
ad_entry, NULL, ACL_READ, NULL ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
- "send_search_entry: conn %lu access "
- "to entry (%s) not allowed\n",
- op->o_connid, e->e_dn ));
+ LDAP_LOG( ACL, INFO,
+ "send_search_entry: conn %lu access to entry (%s) not allowed\n",
+ op->o_connid, e->e_dn, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"send_search_entry: access to entry not allowed\n",
rc = ber_write(ber, (char *)&op->o_peeraddr, sizeof(struct sockaddr), 0);
if (rc != sizeof(struct sockaddr)) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %lu ber_printf failed\n",
- conn ? conn->c_connid : 0 ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_search_entry: conn %lu ber_printf failed\n",
+ conn ? conn->c_connid : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %lu ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_search_entry: conn %lu ber_printf failed\n",
+ op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %lu "
- "matched values filtering failed\n",
- conn ? conn->c_connid : 0 ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_search_entry: conn %lu matched values filtering failed\n",
+ conn ? conn->c_connid : 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"matched values filtering failed\n", 0, 0, 0 );
ACL_READ, &acl_state ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO, "send_search_entry: "
- "conn %lu access to attribute %s "
- "not allowed\n",
- op->o_connid, desc->ad_cname.bv_val ));
+ LDAP_LOG( ACL, INFO,
+ "send_search_entry: conn %lu access to attribute %s not "
+ "allowed\n", op->o_connid, desc->ad_cname.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ACL, "acl: "
"access to attribute %s not allowed\n",
if (( rc = ber_printf( ber, "{O[" /*]}*/ , &desc->ad_cname )) == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: "
- "conn %lu ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_search_entry: conn %lu ber_printf failed\n",
+ op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
desc, &a->a_vals[i], ACL_READ, &acl_state ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ LDAP_LOG( ACL, INFO,
"send_search_entry: conn %lu "
- "access to attribute %s, "
- "value %d not allowed\n",
- op->o_connid,
- desc->ad_cname.bv_val, i ));
+ "access to attribute %s, value %d not allowed\n",
+ op->o_connid, desc->ad_cname.bv_val, i );
#else
Debug( LDAP_DEBUG_ACL,
"acl: access to attribute %s, "
if (( rc = ber_printf( ber, "O", &a->a_vals[i] )) == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG( OPERATION, ERR,
"send_search_entry: conn %lu "
- "ber_printf failed.\n",
- op->o_connid ));
+ "ber_printf failed.\n", op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"ber_printf failed\n", 0, 0, 0 );
if (( rc = ber_printf( ber, /*{[*/ "]N}" )) == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %lu "
- "ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_search_entry: conn %lu ber_printf failed\n",
+ op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG( OPERATION, ERR,
"send_search_entry: conn %lu "
- "matched values filtering failed\n",
- conn ? conn->c_connid : 0 ));
+ "matched values filtering failed\n",
+ conn ? conn->c_connid : 0, 0, 0);
#else
Debug( LDAP_DEBUG_ANY,
"matched values filtering failed\n", 0, 0, 0 );
ACL_READ, &acl_state ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ LDAP_LOG( ACL, INFO,
"send_search_entry: conn %lu "
"access to attribute %s not allowed\n",
- op->o_connid, desc->ad_cname.bv_val ));
+ op->o_connid, desc->ad_cname.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ACL, "acl: access to attribute %s "
"not allowed\n",
rc = ber_printf( ber, "{O[" /*]}*/ , &desc->ad_cname );
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG( OPERATION, ERR,
"send_search_entry: conn %lu "
- "ber_printf failed\n",
- op->o_connid ));
+ "ber_printf failed\n", op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
desc, &a->a_vals[i], ACL_READ, &acl_state ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ LDAP_LOG( ACL, INFO,
"send_search_entry: conn %lu "
- "access to %s, value %d "
- "not allowed\n",
- op->o_connid,
- desc->ad_cname.bv_val, i ));
+ "access to %s, value %d not allowed\n",
+ op->o_connid, desc->ad_cname.bv_val, i );
#else
Debug( LDAP_DEBUG_ACL,
"acl: access to attribute %s, "
if (( rc = ber_printf( ber, "O", &a->a_vals[i] )) == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: "
- "conn %lu ber_printf "
- "failed\n",
- op->o_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_search_entry: conn %lu ber_printf failed\n",
+ op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"ber_printf failed\n", 0, 0, 0 );
if (( rc = ber_printf( ber, /*{[*/ "]N}" )) == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %lu "
- "ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_search_entry: conn %lu ber_printf failed\n",
+ op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
#endif
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %lu ber_printf failed\n",
- op->o_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_search_entry: conn %lu ber_printf failed\n",
+ op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
#endif
if ( bytes < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_search_entry: conn %lu ber write failed.\n",
- op->o_connid ));
+ LDAP_LOG( OPERATION, ERR,
+ "send_search_entry: conn %lu ber write failed.\n",
+ op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"send_search_entry: ber write failed\n",
conn->c_connid, op->o_opid, e->e_dn, 0, 0 );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_search_entry: conn %lu exit.\n",
- op->o_connid ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "send_search_entry: conn %lu exit.\n", op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= send_search_entry\n", 0, 0, 0 );
#endif
AttributeDescription *ad_entry = slap_schema.si_ad_entry;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_search_reference: conn %lu dn=\"%s\"\n",
- op->o_connid, e->e_dn ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "send_search_reference: conn %lu dn=\"%s\"\n",
+ op->o_connid, e->e_dn, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"=> send_search_reference: dn=\"%s\"\n",
ad_entry, NULL, ACL_READ, NULL ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ LDAP_LOG( ACL, INFO,
"send_search_reference: conn %lu "
- "access to entry %s not allowed\n",
- op->o_connid, e->e_dn ));
+ "access to entry %s not allowed\n", op->o_connid, e->e_dn, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"send_search_reference: access to entry not allowed\n",
ad_ref, NULL, ACL_READ, NULL ) )
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "acl", LDAP_LEVEL_INFO,
+ LDAP_LOG( ACL, INFO,
"send_search_reference: conn %lu access "
- "to reference not allowed.\n",
- op->o_connid ));
+ "to reference not allowed.\n", op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ACL,
"send_search_reference: access "
if( refs == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG( OPERATION, ERR,
"send_search_reference: conn %lu null ref in (%s).\n",
- op->o_connid, e->e_dn ));
+ op->o_connid, e->e_dn, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"send_search_reference: null ref in (%s)\n",
if ( rc == -1 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG( OPERATION, ERR,
"send_search_reference: conn %lu "
- "ber_printf failed.\n",
- op->o_connid ));
+ "ber_printf failed.\n", op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"send_search_reference: ber_printf failed\n", 0, 0, 0 );
conn->c_connid, op->o_opid, e->e_dn, 0, 0 );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "send_search_reference: conn %lu exit.\n", op->o_connid ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "send_search_reference: conn %lu exit.\n", op->o_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<= send_search_reference\n", 0, 0, 0 );
#endif
if ( strncasecmp( s, "RESULT", 6 ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "str2result: (%s), expecting \"RESULT\"\n", s ));
+ LDAP_LOG( OPERATION, INFO,
+ "str2result: (%s), expecting \"RESULT\"\n", s, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "str2result (%s) expecting \"RESULT\"\n",
s, 0, 0 );
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "str2result: (%s) unknown.\n", s ));
+ LDAP_LOG( OPERATION, INFO, "str2result: (%s) unknown.\n", s, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "str2result (%s) unknown\n",
s, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "SASL [conn=%ld] %s: %s\n",
- conn ? conn->c_connid : -1,
- label, message ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "SASL [conn=%ld] %s: %s\n", conn ? conn->c_connid : -1, label, message);
#else
Debug( level, "SASL [conn=%ld] %s: %s\n",
conn ? conn->c_connid: -1,
struct berval dn2;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( TRANSPORT, ENTRY,
"slap_sasl_getdn: conn %d id=%s\n",
- conn ? conn->c_connid : -1,
- id ? (*id ? id : "<empty>") : "NULL" ));
+ conn ? conn->c_connid : -1, id ? (*id ? id : "<empty>") : "NULL" );
#else
Debug( LDAP_DEBUG_ARGS, "slap_sasl_getdn: id=%s\n",
id?(*id?id:"<empty>"):"NULL",0,0 );
dn->bv_len = p - dn->bv_val;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_getdn: u:id converted to %s.\n", dn->bv_val ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_sasl_getdn: u:id converted to %s.\n", dn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "getdn: u:id converted to %s\n", dn->bv_val,0,0 );
#endif
ch_free( dn->bv_val );
*dn = dn2;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_getdn: dn:id converted to %s.\n", dn->bv_val ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_sasl_getdn: dn:id converted to %s.\n", dn->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "getdn: dn:id converted to %s\n",
dn->bv_val, 0, 0 );
rc = slap_str2ad( name, &ad, &text );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
- "slap_auxprop: str2ad(%s): %s\n", name, text ));
+ LDAP_LOG( TRANSPORT, DETAIL1,
+ "slap_auxprop: str2ad(%s): %s\n", name, text, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"slap_auxprop: str2ad(%s): %s\n", name, text, 0 );
*out_len = 0;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( TRANSPORT, ENTRY,
"slap_sasl_canonicalize: conn %d %s=\"%s\"\n",
- conn ? conn->c_connid : -1,
- (flags & SASL_CU_AUTHID) ? "authcid" : "authzid",
- in ? in : "<empty>" ));
+ conn ? conn->c_connid : -1,
+ (flags & SASL_CU_AUTHID) ? "authcid" : "authzid", in ? in : "<empty>");
#else
Debug( LDAP_DEBUG_ARGS, "SASL Canonicalize [conn=%ld]: "
"%s=\"%s\"\n",
prop_set( props, names[0], (char *)&dn, sizeof( dn ) );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( TRANSPORT, ENTRY,
"slap_sasl_canonicalize: conn %d %s=\"%s\"\n",
- conn ? conn->c_connid : -1,
- names[0]+1, dn.bv_val ));
+ conn ? conn->c_connid : -1, names[0]+1, dn.bv_val );
#else
Debug( LDAP_DEBUG_ARGS, "SASL Canonicalize [conn=%ld]: "
"%s=\"%s\"\n",
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( TRANSPORT, ENTRY,
"slap_sasl_authorize: conn %d authcid=\"%s\" authzid=\"%s\"\n",
- conn ? conn->c_connid : -1, auth_identity, requested_user));
+ conn ? conn->c_connid : -1, auth_identity, requested_user);
#else
Debug( LDAP_DEBUG_ARGS, "SASL Authorize [conn=%ld]: "
"authcid=\"%s\" authzid=\"%s\"\n",
ch_free( authcDN.bv_val );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_INFO,
- "slap_sasl_authorize: conn %ld authorization disallowed (%d)\n",
- (long)(conn ? conn->c_connid : -1), rc ));
+ LDAP_LOG( TRANSPORT, INFO,
+ "slap_sasl_authorize: conn %ld authorization disallowed (%d)\n",
+ (long)(conn ? conn->c_connid : -1), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "SASL Authorize [conn=%ld]: "
" authorization disallowed (%d)\n",
conn->c_sasl_dn = authzDN;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_authorize: conn %d authorization allowed\n",
- (long)(conn ? conn->c_connid : -1 ) ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_sasl_authorize: conn %d authorization allowed\n",
+ (long)(conn ? conn->c_connid : -1), 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "SASL Authorize [conn=%ld]: "
" authorization allowed\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_authorize: conn %d authcid=\"%s\" authzid=\"%s\"\n",
- conn ? conn->c_connid : -1,
- authcid ? authcid : "<empty>",
- authzid ? authzid : "<empty>" ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_sasl_authorize: conn %d authcid=\"%s\" authzid=\"%s\"\n",
+ conn ? conn->c_connid : -1, authcid ? authcid : "<empty>",
+ authzid ? authzid : "<empty>" );
#else
Debug( LDAP_DEBUG_ARGS, "SASL Authorize [conn=%ld]: "
"authcid=\"%s\" authzid=\"%s\"\n",
rc = sasl_getprop( conn->c_sasl_context, SASL_REALM, (void **)&realm );
if( rc != SASL_OK && rc != SASL_NOTDONE ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_authorize: getprop(REALM) failed.\n" ));
+ LDAP_LOG( TRANSPORT, ERR,
+ "slap_sasl_authorize: getprop(REALM) failed.\n", 0, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE,
"authorize: getprop(REALM) failed!\n", 0,0,0);
}
if( ( authzid == NULL ) || !strcmp( authcid,authzid ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_authorize: conn %d Using authcDN=%s\n",
- conn ? conn->c_connid : -1, authcDN.bv_val ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_sasl_authorize: conn %d Using authcDN=%s\n",
+ conn ? conn->c_connid : -1, authcDN.bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "SASL Authorize [conn=%ld]: "
"Using authcDN=%s\n", (long) (conn ? conn->c_connid : -1), authcDN.bv_val,0 );
ch_free( authcDN.bv_val );
if( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_INFO,
- "slap_sasl_authorize: conn %ld authorization disallowed (%d)\n",
- (long)(conn ? conn->c_connid : -1), rc ));
+ LDAP_LOG( TRANSPORT, INFO,
+ "slap_sasl_authorize: conn %ld authorization disallowed (%d)\n",
+ (long)(conn ? conn->c_connid : -1), rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "SASL Authorize [conn=%ld]: "
" authorization disallowed (%d)\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_authorize: conn %d authorization allowed\n",
- (long)(conn ? conn->c_connid : -1 ) ));
+ LDAP_LOG( TRANSPORT, RESULTS,
+ "slap_sasl_authorize: conn %d authorization allowed\n",
+ (long)(conn ? conn->c_connid : -1 ), 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "SASL Authorize [conn=%ld]: "
" authorization allowed\n",
if( rc != SASL_OK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_INFO,
- "slap_sasl_init: init failed.\n" ));
+ LDAP_LOG( TRANSPORT, INFO, "slap_sasl_init: init failed.\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "sasl_server_init failed\n",
0, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_INFO,
- "slap_sasl_init: initialized!\n"));
+ LDAP_LOG( TRANSPORT, INFO, "slap_sasl_init: initialized!\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_sasl_init: initialized!\n",
0, 0, 0 );
if( sc != SASL_OK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_open: sasl_server_new failed: %d\n", sc ));
+ LDAP_LOG( TRANSPORT, ERR,
+ "slap_sasl_open: sasl_server_new failed: %d\n", sc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "sasl_server_new failed: %d\n",
sc, 0, 0 );
if( sc != SASL_OK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_open: sasl_setprop failed: %d \n", sc ));
+ LDAP_LOG( TRANSPORT, ERR,
+ "slap_sasl_open: sasl_setprop failed: %d \n", sc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "sasl_setprop failed: %d\n",
sc, 0, 0 );
if( sc != SASL_OK ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_mechs: sasl_listmech failed: %d\n", sc ));
+ LDAP_LOG( TRANSPORT, ERR,
+ "slap_sasl_mechs: sasl_listmech failed: %d\n", sc, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "slap_sasl_listmech failed: %d\n",
sc, 0, 0 );
int sc;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "sasl_bind: conn %ld dn=\"%s\" mech=%s datalen=%ld\n",
- conn->c_connid,
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "sasl_bind: dn=\"%s\" mech=%s datalen=%ld\n",
dn->bv_len ? dn->bv_val : "",
- conn->c_sasl_bind_in_progress ? "<continuing>" : conn->c_sasl_bind_mech.bv_val,
- cred ? cred->bv_len : 0 ));
+ conn->c_sasl_bind_in_progress ? "<continuing>" :
+ conn->c_sasl_bind_mech.bv_val,
+ cred ? cred->bv_len : 0 );
#else
Debug(LDAP_DEBUG_ARGS,
"==> sasl_bind: dn=\"%s\" mech=%s datalen=%ld\n",
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_bind: rc=%d\n", rc ));
+ LDAP_LOG( TRANSPORT, RESULTS, "slap_sasl_bind: rc=%d\n", rc, 0, 0 );
#else
Debug(LDAP_DEBUG_TRACE, "<== slap_sasl_bind: rc=%d\n", rc, 0, 0);
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_parseURI: parsing %s\n", uri->bv_val ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_parseURI: parsing %s\n", uri->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_parseURI: parsing %s\n", uri->bv_val, 0, 0 );
#endif
if ( *c == '$' ) {
if ( n == SASLREGEX_REPLACE ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
+ LDAP_LOG( TRANSPORT, ERR,
"slap_sasl_regexp_config: \"%s\" has too many $n "
- "placeholders (max %d)\n",
- rep, SASLREGEX_REPLACE ));
+ "placeholders (max %d)\n", rep, SASLREGEX_REPLACE, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"SASL replace pattern %s has too many $n "
rc = dnNormalize2( NULL, &bv, &nbv );
if ( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_regexp_config: \"%s\" could not be normalized.\n",
- match ));
+ LDAP_LOG( TRANSPORT, ERR,
+ "slap_sasl_regexp_config: \"%s\" could not be normalized.\n",
+ match, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"SASL match pattern %s could not be normalized.\n",
if ( filter ) filter_free( filter );
if ( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_regexp_config: \"%s\" could not be parsed.\n",
- replace ));
+ LDAP_LOG( TRANSPORT, ERR,
+ "slap_sasl_regexp_config: \"%s\" could not be parsed.\n",
+ replace, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"SASL replace pattern %s could not be parsed.\n",
rc = regcomp( ®->sr_workspace, reg->sr_match, REG_EXTENDED|REG_ICASE );
if ( rc ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ERR,
- "slap_sasl_regexp_config: \"%s\" could not be compiled.\n",
- reg->sr_match ));
+ LDAP_LOG( TRANSPORT, ERR,
+ "slap_sasl_regexp_config: \"%s\" could not be compiled.\n",
+ reg->sr_match, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"SASL match pattern %s could not be compiled by regexp engine\n",
memset( out, 0, sizeof( *out ) );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_regexp: converting SASL name %s\n", saslname ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_sasl_regexp: converting SASL name %s\n", saslname, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "slap_sasl_regexp: converting SASL name %s\n",
saslname, 0, 0 );
out->scope = reg->sr_replace.scope;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( TRANSPORT, ENTRY,
"slap_sasl_regexp: converted SASL name to ldap:///%s??%s?%s\n",
out->dn.bv_val, scope[out->scope], out->filter.bv_val ?
- out->filter.bv_val : "" ));
+ out->filter.bv_val : "" );
#else
Debug( LDAP_DEBUG_TRACE,
"slap_sasl_regexp: converted SASL name to ldap:///%s??%s?%s\n",
ndn->bv_val = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
- "slap_sasl2dn: search DN returned more than 1 entry\n" ));
+ LDAP_LOG( TRANSPORT, DETAIL1,
+ "slap_sasl2dn: search DN returned more than 1 entry\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"slap_sasl2dn: search DN returned more than 1 entry\n", 0,0,0 );
SaslUri_t uri;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl2dn: converting SASL name %s to DN.\n", saslname->bv_val ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_sasl2dn: converting SASL name %s to DN.\n", saslname->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "==>slap_sasl2dn: "
"converting SASL name %s to a DN\n", saslname->bv_val, 0,0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( TRANSPORT, DETAIL1,
"slap_sasl2dn: performing internal search (base=%s, scope=%d)\n",
- uri.dn.bv_val, uri.scope ));
+ uri.dn.bv_val, uri.scope, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"slap_sasl2dn: performing internal search (base=%s, scope=%d)\n",
if( filter ) filter_free( filter );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( TRANSPORT, ENTRY,
"slap_sasl2dn: Converted SASL name to %s\n",
- dn->bv_len ? dn->bv_val : "<nothing>" ));
+ dn->bv_len ? dn->bv_val : "<nothing>", 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "<==slap_sasl2dn: Converted SASL name to %s\n",
dn->bv_len ? dn->bv_val : "<nothing>", 0, 0 );
Operation op = {0};
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_match: comparing DN %s to rule %s\n", assertDN->bv_val, rule->bv_val ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_sasl_match: comparing DN %s to rule %s\n",
+ assertDN->bv_val, rule->bv_val,0 );
#else
Debug( LDAP_DEBUG_TRACE,
"===>slap_sasl_match: comparing DN %s to rule %s\n", assertDN->bv_val, rule->bv_val, 0 );
/* Must run an internal search. */
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG( TRANSPORT, DETAIL1,
"slap_sasl_match: performing internal search (base=%s, scope=%d)\n",
- searchbase.bv_val, scope ));
+ searchbase.bv_val, scope,0 );
#else
Debug( LDAP_DEBUG_TRACE,
"slap_sasl_match: performing internal search (base=%s, scope=%d)\n",
if( searchbase.bv_len ) ch_free( searchbase.bv_val );
if( filter ) filter_free( filter );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_match: comparison returned %d\n", rc ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_sasl_match: comparison returned %d\n", rc, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<===slap_sasl_match: comparison returned %d\n", rc, 0, 0);
BerVarray vals=NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( TRANSPORT, ENTRY,
"slap_sasl_check_authz: does %s match %s rule in %s?\n",
- assertDN->bv_val, ad->ad_cname.bv_val, searchDN->bv_val ));
+ assertDN->bv_val, ad->ad_cname.bv_val, searchDN->bv_val);
#else
Debug( LDAP_DEBUG_TRACE,
"==>slap_sasl_check_authz: does %s match %s rule in %s?\n",
if( vals ) ber_bvarray_free( vals );
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_check_authz: %s check returning %s\n", ad->ad_cname.bv_val, rc ));
+ LDAP_LOG( TRANSPORT, RESULTS,
+ "slap_sasl_check_authz: %s check returning %s\n",
+ ad->ad_cname.bv_val, rc, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<==slap_sasl_check_authz: %s check returning %d\n", ad->ad_cname.bv_val, rc, 0);
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_authorized: can %s become %s?\n", authcDN->bv_val, authzDN->bv_val ));
+ LDAP_LOG( TRANSPORT, ENTRY,
+ "slap_sasl_authorized: can %s become %s?\n",
+ authcDN->bv_val, authzDN->bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"==>slap_sasl_authorized: can %s become %s?\n", authcDN->bv_val, authzDN->bv_val, 0 );
#endif
#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_ENTRY,
- "slap_sasl_authorized: return %d\n", rc ));
+ LDAP_LOG( TRANSPORT, RESULTS, "slap_sasl_authorized: return %d\n", rc,0,0 );
#else
Debug( LDAP_DEBUG_TRACE,
"<== slap_sasl_authorized: return %d\n", rc, 0, 0 );
type );
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: dn=\"%s\" %s\n",
- e->e_dn, textbuf ));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_schema_check: dn=\"%s\" %s\n", e->e_dn, textbuf, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Entry (%s), %s\n",
asc = attr_find( e->e_attrs, ad_structuralObjectClass );
if ( asc == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO, "entry_schema_check: "
- "No structuralObjectClass for entry (%s)\n",
- e->e_dn ));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_schema_check: No structuralObjectClass for entry (%s)\n",
+ e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"No structuralObjectClass for entry (%s)\n",
asc->a_vals[0].bv_val );
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: dn (%s), %s\n",
- e->e_dn, textbuf ));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_schema_check: dn (%s), %s\n", e->e_dn, textbuf, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"entry_check_schema(%s): %s\n",
asc->a_vals[0].bv_val );
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: dn (%s), %s\n",
- e->e_dn, textbuf ));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_schema_check: dn (%s), %s\n", e->e_dn, textbuf, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"entry_check_schema(%s): %s\n",
aoc = attr_find( e->e_attrs, ad_objectClass );
if ( aoc == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: No objectClass for entry (%s).\n",
- e->e_dn ));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_schema_check: No objectClass for entry (%s).\n",
+ e->e_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "No objectClass for entry (%s)\n",
e->e_dn, 0, 0 );
aoc->a_vals[i].bv_val );
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: dn (%s), %s\n",
- e->e_dn, textbuf ));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_schema_check: dn (%s), %s\n", e->e_dn, textbuf, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"entry_check_schema(%s): %s\n",
aoc->a_vals[i].bv_val );
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"entry_schema_check: dn (%s), %s\n",
- e->e_dn, textbuf ));
+ e->e_dn, textbuf, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"entry_check_schema(%s): %s\n",
aoc->a_vals[i].bv_val );
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: dn (%s), %s\n",
- e->e_dn, textbuf ));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_schema_check: dn (%s), %s\n",
+ e->e_dn, textbuf, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"entry_check_schema(%s): %s\n",
aoc->a_vals[i].bv_val, s );
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: dn=\"%s\" %s",
- e->e_dn, textbuf ));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_schema_check: dn=\"%s\" %s", e->e_dn, textbuf, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Entry (%s): %s\n",
type );
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_INFO,
- "entry_schema_check: dn=\"%s\" %s\n",
- e->e_dn, textbuf ));
+ LDAP_LOG( OPERATION, INFO,
+ "entry_schema_check: dn=\"%s\" %s\n", e->e_dn, textbuf, 0);
#else
Debug( LDAP_DEBUG_ANY,
"Entry (%s), %s\n",
Attribute *a;
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "oc_check_required: dn (%s), objectClass \"%s\"\n",
- e->e_dn, ocname->bv_val ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "oc_check_required: dn (%s), objectClass \"%s\"\n",
+ e->e_dn, ocname->bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"oc_check_required entry (%s), objectClass \"%s\"\n",
int i, j;
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "oc_check_allowed: type \"%s\"\n", at->sat_cname.bv_val ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "oc_check_allowed: type \"%s\"\n", at->sat_cname.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"oc_check_allowed type \"%s\"\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "objectIdentifierFirstComponentMatch: %d\n %s\n %s\n",
- match, value->bv_val, asserted->bv_val ));
+ LDAP_LOG( CONFIG, ENTRY,
+ "objectIdentifierFirstComponentMatch: %d\n %s\n %s\n",
+ match, value->bv_val, asserted->bv_val );
#else
Debug( LDAP_DEBUG_ARGS, "objectIdentifierFirstComponentMatch "
"%d\n\t\"%s\"\n\t\"%s\"\n",
xcert = d2i_X509(NULL, &p, in->bv_len);
if ( !xcert ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "certificateExactConvert: error parsing cert: %s\n",
- ERR_error_string(ERR_get_error(),NULL)));
+ LDAP_LOG( CONFIG, ENTRY,
+ "certificateExactConvert: error parsing cert: %s\n",
+ ERR_error_string(ERR_get_error(),NULL), 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "certificateExactConvert: "
"error parsing cert: %s\n",
*p++ = '\0';
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "certificateExactConvert: \n %s\n",
- out->bv_val));
+ LDAP_LOG( CONFIG, ARGS,
+ "certificateExactConvert: \n %s\n", out->bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "certificateExactConvert "
"\n\t\"%s\"\n",
xcert = d2i_X509(NULL, &p, value->bv_len);
if ( !xcert ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "certificateExactMatch: error parsing cert: %s\n",
- ERR_error_string(ERR_get_error(),NULL)));
+ LDAP_LOG( CONFIG, ENTRY,
+ "certificateExactMatch: error parsing cert: %s\n",
+ ERR_error_string(ERR_get_error(),NULL), 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "certificateExactMatch: "
"error parsing cert: %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "certificateExactMatch: %d\n %s $ %s\n %s $ %s\n",
- *matchp, serial.bv_val, issuer_dn.bv_val,
- asserted_serial.bv_val, asserted_issuer_dn.bv_val));
+ LDAP_LOG( CONFIG, ARGS, "certificateExactMatch "
+ "%d\n\t\"%s $ %s\"\n",
+ *matchp, serial.bv_val, issuer_dn.bv_val );
+ LDAP_LOG( CONFIG, ARGS, "\t\"%s $ %s\"\n",
+ asserted_serial.bv_val, asserted_issuer_dn.bv_val,
+ 0 );
#else
Debug( LDAP_DEBUG_ARGS, "certificateExactMatch "
"%d\n\t\"%s $ %s\"\n",
xcert = d2i_X509(NULL, &p, values[i].bv_len);
if ( !xcert ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "certificateExactIndexer: error parsing cert: %s\n",
- ERR_error_string(ERR_get_error(),NULL)));
+ LDAP_LOG( CONFIG, ENTRY,
+ "certificateExactIndexer: error parsing cert: %s\n",
+ ERR_error_string(ERR_get_error(),NULL), 0, 0);
#else
Debug( LDAP_DEBUG_ARGS, "certificateExactIndexer: "
"error parsing cert: %s\n",
&keys[i] );
ber_memfree(serial.bv_val);
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "certificateExactIndexer: returning: %s\n",
- keys[i].bv_val));
+ LDAP_LOG( CONFIG, ENTRY,
+ "certificateExactIndexer: returning: %s\n", keys[i].bv_val, 0, 0);
#else
Debug( LDAP_DEBUG_ARGS, "certificateExactIndexer: "
"returning: %s\n",
slap_schema_init( void )
{
int res;
- int i;
+ int i = 0;
/* we should only be called once (from main) */
assert( schema_init_done == 0 );
#if 1
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "> objectClassMatch(%s, %s)\n",
- value->bv_val, a->bv_val ));
+ LDAP_LOG( CONFIG, ENTRY,
+ "> objectClassMatch(%s, %s)\n", value->bv_val, a->bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "> objectClassMatch(%s,%s)\n",
value->bv_val, a->bv_val, 0 );
#if 1
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "< objectClassMatch(%s, %s) = %d\n",
- value->bv_val, a->bv_val, *matchp ));
+ LDAP_LOG( CONFIG, ENTRY,
+ "< objectClassMatch(%s, %s) = %d\n",
+ value->bv_val, a->bv_val, *matchp );
#else
Debug( LDAP_DEBUG_TRACE, "< objectClassMatch(%s,%s) = %d\n",
value->bv_val, a->bv_val, *matchp );
#if 1
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "> structuralObjectClassMatch(%s, %s)\n",
- value->bv_val, a->bv_val ));
+ LDAP_LOG( CONFIG, ENTRY,
+ "> structuralObjectClassMatch(%s, %s)\n", value->bv_val, a->bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "> structuralObjectClassMatch(%s,%s)\n",
value->bv_val, a->bv_val, 0 );
#if 1
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
- "< structuralObjectClassMatch( %s, %s ) = %d\n",
- value->bv_val, a->bv_val, *matchp ));
+ LDAP_LOG( CONFIG, ENTRY,
+ "< structuralObjectClassMatch( %s, %s ) = %d\n",
+ value->bv_val, a->bv_val, *matchp );
#else
Debug( LDAP_DEBUG_TRACE, "< structuralObjectClassMatch(%s,%s) = %d\n",
value->bv_val, a->bv_val, *matchp );
int manageDSAit;
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_search: conn %d\n", conn->c_connid ));
+ LDAP_LOG( OPERATION, ENTRY, "do_search: conn %d\n", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_search\n", 0, 0, 0 );
#endif
rc = dnPrettyNormal( NULL, &base, &pbase, &nbase );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, ERR,
"do_search: conn %d invalid dn (%s)\n",
- conn->c_connid, base.bv_val ));
+ conn->c_connid, base.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"do_search: invalid dn (%s)\n", base.bv_val, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_search \"%s\" %d %d %d %d %d\n", base.bv_val, scope,
- deref, sizelimit, timelimit, attrsonly ));
+ LDAP_LOG( OPERATION, ARGS, "SRCH \"%s\" %d %d",
+ base.bv_val, scope, deref );
+ LDAP_LOG( OPERATION, ARGS, " %d %d %d\n",
+ sizelimit, timelimit, attrsonly);
#else
Debug( LDAP_DEBUG_ARGS, "SRCH \"%s\" %d %d",
base.bv_val, scope, deref );
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_search: conn %d filter: %s\n", conn->c_connid,
- fstr.bv_len ? fstr.bv_val : "empty" ));
+ LDAP_LOG( OPERATION, ARGS,
+ "do_search: conn %d filter: %s\n",
+ conn->c_connid, fstr.bv_len ? fstr.bv_val : "empty", 0 );
#else
Debug( LDAP_DEBUG_ARGS, " filter: %s\n",
fstr.bv_len ? fstr.bv_val : "empty", 0, 0 );
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
+ LDAP_LOG( OPERATION, INFO,
"do_search: conn %d get_ctrls failed (%d)\n",
- conn->c_connid, rc ));
+ conn->c_connid, rc, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_search: get_ctrls failed\n", 0, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_search: conn %d attrs:", conn->c_connid ));
+ LDAP_LOG( OPERATION, ARGS,
+ "do_search: conn %d attrs:", conn->c_connid, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, " attrs:", 0, 0, 0 );
#endif
if ( siz != 0 ) {
for ( i = 0; i<siz; i++ ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS,
- "do_search: %s", an[i].an_name.bv_val ));
+ LDAP_LOG( OPERATION, ARGS,
+ "do_search: %s", an[i].an_name.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, " %s", an[i].an_name.bv_val, 0, 0 );
#endif
}
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ARGS, "\n" ));
+ LDAP_LOG( OPERATION, ARGS, "\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "\n", 0, 0, 0 );
#endif
const char *text = NULL;
#ifdef NEW_LOGGING
- LDAP_LOG(( "filter", LDAP_LEVEL_ENTRY,
- "str2filter: \"%s\"\n", str ));
+ LDAP_LOG( FILTER, ENTRY, "str2filter: \"%s\"\n", str, 0, 0 );
#else
Debug( LDAP_DEBUG_FILTER, "str2filter \"%s\"\n", str, 0, 0 );
#endif
strncpy( dn->bv_val, oldDN, diff );
strcpy( &dn->bv_val[diff], be->be_suffixAlias[i+1].bv_val );
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "suffix_alias: converted \"%s\" to \"%s\"\n",
- oldDN, dn->bv_val ));
+ LDAP_LOG( OPERATION, INFO,
+ "suffix_alias: converted \"%s\" to \"%s\"\n",
+ oldDN, dn->bv_val, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"suffix_alias: converted \"%s\" to \"%s\"\n",
#include "slap.h"
#include "ldap_pvt.h"
-
struct sindexrec {
char *sir_name;
Syntax *sir_syn;
syn = ldap_str2syntax( desc, &code, &err, LDAP_SCHEMA_ALLOW_ALL);
if ( !syn ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ERR,
- "register_syntax: Error - %s before %s in %s.\n",
- ldap_scherr2str(code), err, desc ));
+ LDAP_LOG( CONFIG, ERR,
+ "register_syntax: Error - %s before %s in %s.\n",
+ ldap_scherr2str(code), err, desc );
#else
Debug( LDAP_DEBUG_ANY, "Error in register_syntax: %s before %s in %s\n",
ldap_scherr2str(code), err, desc );
if ( code ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ERR,
- "register_syntax: Error - %s %s in %s\n",
- scherr2str(code), err, desc ));
+ LDAP_LOG( CONFIG, ERR,
+ "register_syntax: Error - %s %s in %s\n",
+ scherr2str(code), err, desc );
#else
Debug( LDAP_DEBUG_ANY, "Error in register_syntax: %s %s in %s\n",
scherr2str(code), err, desc );
}
#if 0
#ifdef NEW_LOGGING
- LDAP_LOG(( "schema", LDAP_LEVEL_ENTRY,
+ LDAP_LOG( config, ENTRY,
"syn_schema_info: Merging syn [%ld] %s\n",
- (long)vals[0].bv_len, vals[0].bv_val ));
+ (long)vals[0].bv_len, vals[0].bv_val, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "Merging syn [%ld] %s\n",
(long) vals[0].bv_len, vals[0].bv_val, 0 );
char textbuf[SLAP_TEXT_BUFLEN] = { '\0' };
size_t textlen = sizeof textbuf;
+#ifdef NEW_LOGGING
+ lutil_log_initialize(argc, argv );
+#endif
slap_tool_init( "slapadd", SLAPADD, argc, argv );
if( !be->be_entry_open ||
#include "slap.h"
-
int
do_unbind(
Connection *conn,
)
{
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_ENTRY,
- "do_unbind: conn %d\n", conn ? conn->c_connid : -1 ));
+ LDAP_LOG( OPERATION, ENTRY,
+ "do_unbind: conn %d\n", conn ? conn->c_connid : -1, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "do_unbind\n", 0, 0, 0 );
#endif
#include "slap.h"
-
/*
* Set real and effective user id and group id, and group access list
* The user and group arguments are freed.
did_getpw:
if ( pwd == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: No passwd entry for user %s\n",
- user ));
+ LDAP_LOG( OPERATION, INFO,
+ "slap_init_user: No passwd entry for user %s\n", user, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "No passwd entry for user %s\n",
user, 0, 0 );
did_group:
if ( grp == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: No group entry for group %s\n", group));
+ LDAP_LOG( OPERATION, INFO,
+ "slap_init_user: No group entry for group %s\n", group, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "No group entry for group %s\n",
group, 0, 0 );
if ( user ) {
if ( getuid() == 0 && initgroups( user, gid ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: Could not set the group access (gid) list.\n" ));
+ LDAP_LOG( OPERATION, INFO,
+ "slap_init_user: Could not set the group access (gid) list.\n",
+ 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Could not set the group access (gid) list\n", 0, 0, 0 );
if ( got_gid ) {
if ( setgid( gid ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: could not set real group id to %d\n", (int)gid));
+ LDAP_LOG( OPERATION, INFO,
+ "slap_init_user: could not set real group id to %d\n",
+ (int)gid, 0, 0);
#else
Debug( LDAP_DEBUG_ANY, "Could not set real group id to %d\n",
(int) gid, 0, 0 );
#ifdef HAVE_SETEGID
if ( setegid( gid ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: Could not set effective group id to %d\n",(int)gid));
+ LDAP_LOG( OPERATION, INFO,
+ "slap_init_user: Could not set effective group id to %d\n",
+ (int)gid, 0, 0);
#else
Debug( LDAP_DEBUG_ANY, "Could not set effective group id to %d\n",
(int) gid, 0, 0 );
if ( got_uid ) {
if ( setuid( uid ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: Could not set real user id to %d\n", (int)uid ));
+ LDAP_LOG( OPERATION, INFO,
+ "slap_init_user: Could not set real user id to %d\n",
+ (int)uid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not set real user id to %d\n",
(int) uid, 0, 0 );
#ifdef HAVE_SETEUID
if ( seteuid( uid ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "slap_init_user: Could not set effective user id to %d\n", (int)uid ));
+ LDAP_LOG( OPERATION, INFO,
+ "slap_init_user: Could not set effective user id to %d\n",
+ (int)uid, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not set effective user id to %d\n",
(int) uid, 0, 0 );
cargv_size = ARGS_STEP + 1;
#ifdef NEW_LOGGING
- LDAP_LOG (( "config", LDAP_LEVEL_ARGS,
- "slurpd_read_config: Config: opening config file \"%s\"\n", fname ));
+ LDAP_LOG ( CONFIG, ARGS,
+ "slurpd_read_config: Config: opening config file \"%s\"\n",
+ fname, 0, 0 );
#else
Debug( LDAP_DEBUG_CONFIG, "Config: opening config file \"%s\"\n",
fname, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "config", LDAP_LEVEL_DETAIL1,
- "slurpd_read_config: Config: (%s)\n", line ));
+ LDAP_LOG ( CONFIG, DETAIL1,
+ "slurpd_read_config: Config: (%s)\n", line, 0, 0 );
#else
Debug( LDAP_DEBUG_CONFIG, "Config: (%s)\n", line, 0, 0 );
#endif
if ( cargc < 2 ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
+ LDAP_LOG( CONFIG, CRIT,
"%s: line %d: missing filename in \"include "
- "<filename>\" line.\n", fname, lineno ));
+ "<filename>\" line.\n", fname, lineno , 0 );
#else
Debug( LDAP_DEBUG_ANY,
"%s: line %d: missing filename in \"include <filename>\" line\n",
}
fclose( fp );
#ifdef NEW_LOGGING
- LDAP_LOG (( "config", LDAP_LEVEL_RESULTS,
+ LDAP_LOG ( CONFIG, RESULTS,
"slurpd_read_config: Config: "
- "** configuration file successfully read and parsed\n" ));
+ "** configuration file successfully read and parsed\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_CONFIG,
"Config: ** configuration file successfully read and parsed\n",
sglob->num_replicas--;
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "config", LDAP_LEVEL_RESULTS,
+ LDAP_LOG ( CONFIG, RESULTS,
"add_replica: Config: ** successfully added replica \"%s%d\"\n",
sglob->replicas[ nr - 1 ]->ri_hostname == NULL ?
"(null)" : sglob->replicas[ nr - 1 ]->ri_hostname,
- sglob->replicas[ nr - 1 ]->ri_port, 0 ));
+ sglob->replicas[ nr - 1 ]->ri_port, 0 );
#else
Debug( LDAP_DEBUG_CONFIG,
"Config: ** successfully added replica \"%s:%d\"\n",
if ( file_nonempty( sglob->slapd_replogfile )) {
/* New work found - copy to slurpd replog file */
#ifdef NEW_LOGGING
- LDAP_LOG (( "fm", LDAP_LEVEL_ARGS,
- "fm: new work in %s\n", sglob->slapd_replogfile ));
+ LDAP_LOG ( SLURPD, ARGS,
+ "fm: new work in %s\n", sglob->slapd_replogfile, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "new work in %s\n",
sglob->slapd_replogfile, 0, 0 );
} else {
if ( rc < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "fm", LDAP_LEVEL_CRIT,
- "fm: Fatal error while copying replication log\n" ));
+ LDAP_LOG ( SLURPD, CRIT,
+ "fm: Fatal error while copying replication log\n" , 0, 0, 0);
#else
Debug( LDAP_DEBUG_ANY,
"Fatal error while copying replication log\n",
if (( rc = acquire_lock( sglob->slurpd_replogfile, &fp,
&lfp )) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "fm", LDAP_LEVEL_ERR,
+ LDAP_LOG ( SLURPD, ERR,
"fm: Error: cannot acquire lock on \"%s\" for trimming\n",
- sglob->slurpd_replogfile ));
+ sglob->slurpd_replogfile, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: cannot acquire lock on \"%s\" for trimming\n",
}
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "fm", LDAP_LEVEL_RESULTS, "fm: exiting\n" ));
+ LDAP_LOG ( SLURPD, RESULTS, "fm: exiting\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "fm: exiting\n", 0, 0, 0 );
#endif
if ( acquire_lock( f, &fp, &lfp ) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "fm", LDAP_LEVEL_ERR,
+ LDAP_LOG ( SLURPD, ERR,
"populate_queue: error: can't lock file \"%s\": %s\n",
- f, sys_errlist[ errno ] ));
+ f, sys_errlist[ errno ], 0 );
#else
Debug( LDAP_DEBUG_ANY,
"error: can't lock file \"%s\": %s\n",
*/
if ( fseek( fp, sglob->srpos, 0 ) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "fm", LDAP_LEVEL_ERR,
+ LDAP_LOG ( SLURPD, ERR,
"populate_queue: error: can't seek to offset %ld in file \"%s\"\n",
- sglob->srpos, f ));
+ sglob->srpos, f, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"error: can't seek to offset %ld in file \"%s\"\n",
*t = '\0';
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "fm", LDAP_LEVEL_ERR,
+ LDAP_LOG ( SLURPD, ERR,
"populate_queue: error: malformed replog entry "
- "(begins with \"%s\")\n", p ));
+ "(begins with \"%s\")\n", p, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"error: malformed replog entry (begins with \"%s\")\n",
lderr = op_ldap_add( ri, re, errmsg );
if ( lderr != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_ldap: "
+ LDAP_LOG ( OPERATION, ERR, "do_ldap: "
"Error: ldap_add_s failed adding \"%s\": %s\n",
- *errmsg ? *errmsg : ldap_err2string( lderr ), re->re_dn ));
+ *errmsg ? *errmsg : ldap_err2string( lderr ),
+ re->re_dn, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: ldap_add_s failed adding \"%s\": %s\n",
lderr = op_ldap_modify( ri, re, errmsg );
if ( lderr != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_ldap: "
+ LDAP_LOG ( OPERATION, ERR, "do_ldap: "
"Error: ldap_modify_s failed modifying \"%s\": %s\n",
- *errmsg ? *errmsg : ldap_err2string( lderr ), re->re_dn ));
+ *errmsg ? *errmsg : ldap_err2string( lderr ),
+ re->re_dn, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: ldap_modify_s failed modifying \"%s\": %s\n",
lderr = op_ldap_delete( ri, re, errmsg );
if ( lderr != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_ldap: "
+ LDAP_LOG ( OPERATION, ERR, "do_ldap: "
"Error: ldap_delete_s failed deleting \"%s\": %s\n",
- *errmsg ? *errmsg : ldap_err2string( lderr ), re->re_dn ));
+ *errmsg ? *errmsg : ldap_err2string( lderr ),
+ re->re_dn, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: ldap_delete_s failed deleting \"%s\": %s\n",
lderr = op_ldap_modrdn( ri, re, errmsg );
if ( lderr != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_ldap: "
+ LDAP_LOG ( OPERATION, ERR, "do_ldap: "
"Error: ldap_modrdn_s failed modifying %s: %s\n",
- *errmsg ? *errmsg : ldap_err2string( lderr ), re->re_dn ));
+ *errmsg ? *errmsg : ldap_err2string( lderr ),
+ re->re_dn, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: ldap_modrdn_s failed modifying %s: %s\n",
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_ldap: "
+ LDAP_LOG ( OPERATION, ERR, "do_ldap: "
"Error: bad op \"%d\", dn = \"%s\"\n",
- re->re_changetype, re->re_dn ));
+ re->re_changetype, re->re_dn, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: do_ldap: bad op \"%d\", dn = \"%s\"\n",
/* Perform the operation */
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ARGS,
+ LDAP_LOG ( OPERATION, ARGS,
"op_ldap_add: replica %s:%d - add dn \"%s\"\n",
- ri->ri_hostname, ri->ri_port, re->re_dn ));
+ ri->ri_hostname, ri->ri_port, re->re_dn );
#else
Debug( LDAP_DEBUG_ARGS, "replica %s:%d - add dn \"%s\"\n",
ri->ri_hostname, ri->ri_port, re->re_dn );
} else {
*errmsg = "No modifications to do";
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
- "op_ldap_add: Error: no mods to do (%s)!\n", re->re_dn ));
+ LDAP_LOG ( OPERATION, ERR,
+ "op_ldap_add: Error: no mods to do (%s)!\n", re->re_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: op_ldap_add: no mods to do (%s)!\n", re->re_dn, 0, 0 );
if ( re->re_mods == NULL ) {
*errmsg = "No arguments given";
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
- "op_ldap_modify: Error: no arguments\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "op_ldap_modify: Error: no arguments\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error: op_ldap_modify: no arguments\n",
0, 0, 0 );
default:
if ( state == AWAITING_OP ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
- "op_ldap_modify: Error: unknown mod type \"%s\"\n", type ));
+ LDAP_LOG ( OPERATION, ERR,
+ "op_ldap_modify: Error: unknown mod type \"%s\"\n", type, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: op_ldap_modify: unknown mod type \"%s\"\n",
*/
if ( strcasecmp( type, ldm->mod_type )) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"op_ldap_modify: Error: "
"malformed modify op, %s: %s (expecting \"%s\")\n",
- type, value, ldm->mod_type ));
+ type, value, ldm->mod_type );
#else
Debug( LDAP_DEBUG_ANY,
"Error: malformed modify op, %s: %s (expecting %s:)\n",
if ( nops > 0 ) {
/* Actually perform the LDAP operation */
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_DETAIL1,
+ LDAP_LOG ( OPERATION, DETAIL1,
"op_ldap_modify: replica %s:%d - modify dn \"%s\"\n",
- ri->ri_hostname, ri->ri_port, re->re_dn ));
+ ri->ri_hostname, ri->ri_port, re->re_dn );
#else
Debug( LDAP_DEBUG_ARGS, "replica %s:%d - modify dn \"%s\"\n",
ri->ri_hostname, ri->ri_port, re->re_dn );
int rc;
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ARGS,
+ LDAP_LOG ( OPERATION, ARGS,
"op_ldap_delete: replica %s:%d - delete dn \"%s\"\n",
- ri->ri_hostname, ri->ri_port, re->re_dn ));
+ ri->ri_hostname, ri->ri_port, re->re_dn );
#else
Debug( LDAP_DEBUG_ARGS, "replica %s:%d - delete dn \"%s\"\n",
ri->ri_hostname, ri->ri_port, re->re_dn );
if ( re->re_mods == NULL ) {
*errmsg = "No arguments given";
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
- "op_ldap_modrdn: Error: no arguments\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "op_ldap_modrdn: Error: no arguments\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error: op_ldap_modrdn: no arguments\n",
0, 0, 0 );
if ( !strcmp( mi[ i ].mi_type, T_NEWRDNSTR )) {
if( state & GOT_NEWRDN ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"op_ldap_modrdn: Error: multiple newrdn arg \"%s\"\n",
- mi[ i ].mi_val ));
+ mi[ i ].mi_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: op_ldap_modrdn: multiple newrdn arg \"%s\"\n",
} else if ( !strcmp( mi[ i ].mi_type, T_DELOLDRDNSTR )) {
if( state & GOT_DELOLDRDN ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"op_ldap_modrdn: Error: multiple deleteoldrdn arg \"%s\"\n",
- mi[ i ].mi_val ));
+ mi[ i ].mi_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: op_ldap_modrdn: multiple deleteoldrdn arg \"%s\"\n",
drdnflag = 1;
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"op_ldap_modrdn: Error: bad deleteoldrdn arg \"%s\"\n",
- mi[ i ].mi_val ));
+ mi[ i ].mi_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: op_ldap_modrdn: bad deleteoldrdn arg \"%s\"\n",
} else if ( !strcmp( mi[ i ].mi_type, T_NEWSUPSTR )) {
if( state & GOT_NEWSUP ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"op_ldap_modrdn: Error: multiple newsuperior arg \"%s\"\n",
- mi[ i ].mi_val ));
+ mi[ i ].mi_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: op_ldap_modrdn: multiple newsuperior arg \"%s\"\n",
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"op_ldap_modrdn: Error: bad type \"%s\"\n",
- mi[ i ].mi_type ));
+ mi[ i ].mi_type, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error: op_ldap_modrdn: bad type \"%s\"\n",
mi[ i ].mi_type, 0, 0 );
*/
if ( !GOT_ALL_MODDN(state) ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
- "op_ldap_modrdn: Error: missing arguments\n" ));
+ LDAP_LOG ( OPERATION, ERR,
+ "op_ldap_modrdn: Error: missing arguments\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error: op_ldap_modrdn: missing arguments\n",
0, 0, 0 );
snprintf( buf2, buf2len, "(\"%s\" -> \"%s\")", re->re_dn, mi->mi_val );
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ARGS,
+ LDAP_LOG ( OPERATION, ARGS,
"op_ldap_modrdn: replica %s - modify rdn %s (flag: %d)\n",
- buf, buf2, drdnflag ));
+ buf, buf2, drdnflag );
#else
Debug( LDAP_DEBUG_ARGS,
"replica %s - modify rdn %s (flag: %d)\n",
rc = ldap_unbind( ri->ri_ldp );
if ( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"do_unbind: ldap_unbind failed for %s:%d: %s\n",
- ri->ri_hostname, ri->ri_port, ldap_err2string( rc ) ));
+ ri->ri_hostname, ri->ri_port, ldap_err2string( rc ) );
#else
Debug( LDAP_DEBUG_ANY,
"Error: do_unbind: ldap_unbind failed for %s:%d: %s\n",
if ( ri == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: null ri ptr\n" ));
+ LDAP_LOG ( OPERATION, ERR, "do_bind: null ri ptr\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error: do_bind: null ri ptr\n", 0, 0, 0 );
#endif
ldrc = ldap_unbind( ri->ri_ldp );
if ( ldrc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
- "do_bind: ldap_unbind failed: %s\n", ldap_err2string( ldrc ) ));
+ LDAP_LOG ( OPERATION, ERR,
+ "do_bind: ldap_unbind failed: %s\n", ldap_err2string( ldrc ), 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: do_bind: ldap_unbind failed: %s\n",
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ARGS,
+ LDAP_LOG ( OPERATION, ARGS,
"do_bind: Initializing session to %s:%d\n",
- ri->ri_hostname, ri->ri_port ));
+ ri->ri_hostname, ri->ri_port, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "Initializing session to %s:%d\n",
ri->ri_hostname, ri->ri_port, 0 );
ri->ri_ldp = ldap_init( ri->ri_hostname, ri->ri_port );
if ( ri->ri_ldp == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR,
+ LDAP_LOG ( OPERATION, ERR,
"do_bind: ldap_init (%s, %d) failed: %s\n",
- ri->ri_hostname, ri->ri_port, sys_errlist[ errno ] ));
+ ri->ri_hostname, ri->ri_port, sys_errlist[ errno ] );
#else
Debug( LDAP_DEBUG_ANY, "Error: ldap_init(%s, %d) failed: %s\n",
ri->ri_hostname, ri->ri_port, sys_errlist[ errno ] );
if( err != LDAP_OPT_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: ",
+ LDAP_LOG ( OPERATION, ERR, "do_bind: "
"Error: ldap_set_option(%s, LDAP_OPT_VERSION, 3) failed!\n",
- ri->ri_hostname ));
+ ri->ri_hostname, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: ldap_set_option(%s, LDAP_OPT_VERSION, 3) failed!\n",
if( err != LDAP_OPT_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: ",
+ LDAP_LOG ( OPERATION, ERR, "do_bind: "
"Error: ldap_set_option(%s, REFERRALS, OFF) failed!\n",
- ri->ri_hostname ));
+ ri->ri_hostname, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: ldap_set_option(%s,REFERRALS, OFF) failed!\n",
if( err != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: ",
+ LDAP_LOG ( OPERATION, ERR, "do_bind: "
"%s: ldap_start_tls failed: %s (%d)\n",
ri->ri_tls == TLS_CRITICAL ? "Error" : "Warning",
- ldap_err2string( err ), err ));
+ ldap_err2string( err ), err );
#else
Debug( LDAP_DEBUG_ANY,
"%s: ldap_start_tls failed: %s (%d)\n",
* Bind with a plaintext password.
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ARGS,
+ LDAP_LOG ( OPERATION, ARGS,
"do_bind: bind to %s:%d as %s (simple)\n",
- ri->ri_hostname, ri->ri_port, ri->ri_bind_dn ));
+ ri->ri_hostname, ri->ri_port, ri->ri_bind_dn );
#else
Debug( LDAP_DEBUG_ARGS, "bind to %s:%d as %s (simple)\n",
ri->ri_hostname, ri->ri_port, ri->ri_bind_dn );
ri->ri_password );
if ( ldrc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
+ LDAP_LOG ( OPERATION, ERR, "do_bind: "
"Error: ldap_simple_bind_s for %s:%d failed: %s\n",
- ri->ri_hostname, ri->ri_port, ldap_err2string( ldrc ) ));
+ ri->ri_hostname, ri->ri_port, ldap_err2string( ldrc ) );
#else
Debug( LDAP_DEBUG_ANY,
"Error: ldap_simple_bind_s for %s:%d failed: %s\n",
case AUTH_SASL:
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ARGS,
+ LDAP_LOG ( OPERATION, ARGS,
"do_bind: bind to %s as %s via %s (SASL)\n",
ri->ri_hostname,
ri->ri_authcId ? ri->ri_authcId : "-",
- ri->ri_saslmech ));
+ ri->ri_saslmech );
#else
Debug( LDAP_DEBUG_ARGS, "bind to %s as %s via %s (SASL)\n",
ri->ri_hostname,
if( err != LDAP_OPT_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
+ LDAP_LOG ( OPERATION, ERR, "do_bind: "
"Error: ldap_set_option(%s,SECPROPS,\"%s\") failed!\n",
- ri->ri_hostname, ri->ri_secprops ));
+ ri->ri_hostname, ri->ri_secprops, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: ldap_set_option(%s,SECPROPS,\"%s\") failed!\n",
LDAP_SASL_QUIET, lutil_sasl_interact, defaults );
if ( ldrc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
+ LDAP_LOG ( OPERATION, ERR, "do_bind: "
"Error: LDAP SASL for %s:%d failed: %s\n",
- ri->ri_hostname, ri->ri_port, ldap_err2string( ldrc ) ));
+ ri->ri_hostname, ri->ri_port, ldap_err2string( ldrc ) );
#else
Debug( LDAP_DEBUG_ANY, "Error: LDAP SASL for %s:%d failed: %s\n",
ri->ri_hostname, ri->ri_port, ldap_err2string( ldrc ));
break;
#else
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
+ LDAP_LOG ( OPERATION, ERR, "do_bind: "
"Error: do_bind: SASL not supported %s:%d\n",
- ri->ri_hostname, ri->ri_port ));
+ ri->ri_hostname, ri->ri_port, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: do_bind: SASL not supported %s:%d\n",
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
+ LDAP_LOG ( OPERATION, ERR, "do_bind: "
"Error: do_bind: unknown auth type \"%d\" for %s:%d\n",
- ri->ri_bind_method, ri->ri_hostname, ri->ri_port ));
+ ri->ri_bind_method, ri->ri_hostname, ri->ri_port );
#else
Debug( LDAP_DEBUG_ANY,
"Error: do_bind: unknown auth type \"%d\" for %s:%d\n",
if( err != LDAP_OPT_SUCCESS ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
+ LDAP_LOG ( OPERATION, ERR, "do_bind: "
"ldap_set_option(%s, SERVER_CONTROLS, ManageDSAit) failed!\n",
- ri->ri_hostname ));
+ ri->ri_hostname, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error: "
"ldap_set_option(%s, SERVER_CONTROLS, ManageDSAit) failed!\n",
for ( i = 0; ldmarr[ i ] != NULL; i++ ) {
ldm = ldmarr[ i ];
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_INFO, "dump_ldm_array: "
+ LDAP_LOG ( OPERATION, INFO, "dump_ldm_array: "
"Trace (%ld): *** ldmarr[ %d ] contents:\n",
- (long) getpid(), i ));
- LDAP_LOG (( "operation", LDAP_LEVEL_INFO, "dump_ldm_array: "
+ (long) getpid(), i, 0 );
+ LDAP_LOG ( OPERATION, INFO, "dump_ldm_array: "
"Trace (%ld): *** ldm->mod_op: %d\n",
- (long) getpid(), ldm->mod_op ));
- LDAP_LOG (( "operation", LDAP_LEVEL_INFO, "dump_ldm_array: "
+ (long) getpid(), ldm->mod_op, 0 );
+ LDAP_LOG ( OPERATION, INFO, "dump_ldm_array: "
"Trace (%ld): *** ldm->mod_type: %s\n",
- (long) getpid(), ldm->mod_type ));
+ (long) getpid(), ldm->mod_type, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"Trace (%ld): *** ldmarr[ %d ] contents:\n",
sprintf( msgbuf, "***** bv[ %d ] len = %ld, val = <%s>",
j, b->bv_len, b->bv_val );
#ifdef NEW_LOGGING
- LDAP_LOG (( "operation", LDAP_LEVEL_INFO, "dump_ldm_array: "
- "Trace (%ld):%s\n", (long) getpid(), msgbuf ));
+ LDAP_LOG ( OPERATION, INFO, "dump_ldm_array: "
+ "Trace (%ld):%s\n", (long) getpid(), msgbuf, 0 );
#else
Debug( LDAP_DEBUG_TRACE,
"Trace (%ld):%s\n", (long) getpid(), msgbuf, 0 );
strcat( buf, ".lock" );
if ( (*lfp = fopen( buf, "w" )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "lock", LDAP_LEVEL_ERR, "lock_fopen: "
- "Error: could not open \"%s\"\n", buf ));
+ LDAP_LOG ( SLURPD, ERR, "lock_fopen: "
+ "Error: could not open \"%s\"\n", buf, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: could not open \"%s\"\n", buf, 0, 0 );
/* open the log file */
if ( (fp = fopen( fname, type )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "lock", LDAP_LEVEL_ERR, "lock_fopen: "
- "Error: could not open \"%s\"\n", fname ));
+ LDAP_LOG ( SLURPD, ERR, "lock_fopen: "
+ "Error: could not open \"%s\"\n", fname, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: could not open \"%s\"\n", fname, 0, 0 );
{
if (( *rfp = lock_fopen( file, "r+", lfp )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "lock", LDAP_LEVEL_ERR, "acquire_lock: "
+ LDAP_LOG ( SLURPD, ERR, "acquire_lock: "
"Error: acquire_lock(%ld): Could not acquire lock on \"%s\"\n",
- (long) getpid(), file ));
+ (long) getpid(), file, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: acquire_lock(%ld): Could not acquire lock on \"%s\"\n",
{
if ( lock_fclose( rfp, lfp ) == EOF ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "lock", LDAP_LEVEL_ERR, "relinguish_lock: "
+ LDAP_LOG ( SLURPD, ERR, "relinguish_lock: "
"Error: relinquish_lock (%ld): Error closing \"%s\"\n",
- (long) getpid(), file ));
+ (long) getpid(), file, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: relinquish_lock (%ld): Error closing \"%s\"\n",
0, fm, (void *) NULL ) != 0 )
{
#ifdef NEW_LOGGING
- LDAP_LOG (( "main", LDAP_LEVEL_ERR,
- "main: file manager ldap_pvt_thread_create failed\n" ));
+ LDAP_LOG ( SLURPD, ERR,
+ "main: file manager ldap_pvt_thread_create failed\n" , 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "file manager ldap_pvt_thread_create failed\n",
0, 0, 0 );
ldap_pvt_thread_destroy();
#ifdef NEW_LOGGING
- LDAP_LOG (( "main", LDAP_LEVEL_RESULTS,
- "main: slurpd terminated\n" ));
+ LDAP_LOG ( SLURPD, RESULTS, "main: slurpd terminated\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "slurpd: terminated.\n", 0, 0, 0 );
#endif
}
if ( re->re_refcnt > 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_WARNING, "Re_free: "
- "Warning: freeing re (dn: %s) with nonzero refcnt\n", re->re_dn ));
+ LDAP_LOG ( SLURPD, WARNING, "Re_free: "
+ "Warning: freeing re (dn: %s) with nonzero refcnt\n", re->re_dn, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Warning: freeing re (dn: %s) with nonzero refcnt\n",
if ( re == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_ERR, "Re_parse: Error: re is NULL\n" ));
+ LDAP_LOG ( SLURPD, ERR, "Re_parse: Error: re is NULL\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Re_parse: error: re is NULL\n", 0, 0, 0 );
#endif
}
if ( replbuf == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_ERR, "Re_parse: Error: replbuf is NULL\n" ));
+ LDAP_LOG ( SLURPD, ERR, "Re_parse: Error: replbuf is NULL\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Re_parse: error: replbuf is NULL\n", 0, 0, 0 );
#endif
buflen = strlen( buf );
if ( ldif_parse_line( buf, &type, &value, &len ) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_ERR,
- "Re_parse: Error: malformed replog file\n" ));
+ LDAP_LOG ( SLURPD, ERR,
+ "Re_parse: Error: malformed replog file\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: Re_parse: malformed replog file\n",
default:
if ( !( state == GOT_ALL )) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_ERR,
- "Re_parse: Error: bad type <%s>\n", type ));
+ LDAP_LOG ( SLURPD, ERR,
+ "Re_parse: Error: bad type <%s>\n", type, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: Re_parse: bad type <%s>\n",
if ( state != GOT_ALL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_ERR,
- "Re_parse: Error: malformed replog file\n" ));
+ LDAP_LOG ( SLURPD, ERR,
+ "Re_parse: Error: malformed replog file\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: Re_parse: malformed replog file\n",
} else {
if ( ldif_parse_line( buf, &type, &value, &len ) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_ERR,
- "Re_parse: Error: malformed replog line \"%s\"\n", buf ));
+ LDAP_LOG ( SLURPD, ERR,
+ "Re_parse: Error: malformed replog line \"%s\"\n", buf, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: malformed replog line \"%s\"\n",
rh = (Rh *) ch_realloc((char *) rh, ( nreplicas + 2 ) * sizeof( Rh ));
if ( rh == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_ERR,
- "get_repl_hosts: Out of memory\n" ));
+ LDAP_LOG ( SLURPD, ERR,
+ "get_repl_hosts: Out of memory\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Out of memory in get_repl_hosts\n",
0, 0, 0 );
if ( re == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_ERR, "Re_dump: re is NULL\n" ));
+ LDAP_LOG ( SLURPD, ERR, "Re_dump: re is NULL\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "Re_dump: re is NULL\n", 0, 0, 0 );
#endif
if ( re == NULL || fp == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_ERR,
- "Re_write: Internal error: NULL argument\n" ));
+ LDAP_LOG ( SLURPD, ERR,
+ "Re_write: Internal error: NULL argument\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Internal error: Re_write: NULL argument\n",
0, 0, 0 );
bad:
if ( rc != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_ERR,
- "Re_write: Error while writing: %s\n", sys_errlist[ errno ] ));
+ LDAP_LOG ( SLURPD, ERR,
+ "Re_write: Error while writing: %s\n", sys_errlist[ errno ], 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error while writing: %s\n",
sys_errlist[ errno ], 0, 0 );
}
if ( !found ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "re", LDAP_LEVEL_WARNING, "warn_unknown_replica: "
+ LDAP_LOG ( SLURPD, WARNING, "warn_unknown_replica: "
"Warning: unknown replica %s:%d found in replication log\n",
- host, port ));
+ host, port, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Warning: unknown replica %s:%d found in replication log\n",
if (( rjfd = open( rejfile, O_RDWR | O_APPEND | O_CREAT,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP )) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "reject", LDAP_LEVEL_ERR, "write_reject: "
+ LDAP_LOG ( SLURPD, ERR, "write_reject: "
"Error: Cannot create \"%s\":%s\n",
- rejfile, sys_errlist[ errno ] ));
+ rejfile, sys_errlist[ errno ], 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: write_reject: Cannot create \"%s\": %s\n",
}
if (( rc = acquire_lock( rejfile, &rfp, &lfp )) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "reject", LDAP_LEVEL_ERR, "write_reject: "
- "Error: Cannot open reject file \"%s\"\n", rejfile ));
+ LDAP_LOG ( SLURPD, ERR, "write_reject: "
+ "Error: Cannot open reject file \"%s\"\n", rejfile, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error: cannot open reject file \"%s\"\n",
rejfile, 0, 0 );
}
if ((rc = re->re_write( ri, re, rfp )) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "reject", LDAP_LEVEL_ERR, "write_reject: "
- "Error: Cannot write reject file \"%s\"\n", rejfile ));
+ LDAP_LOG ( SLURPD, ERR, "write_reject: "
+ "Error: Cannot write reject file \"%s\"\n", rejfile, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: cannot write reject file \"%s\"\n",
}
(void) relinquish_lock( rejfile, rfp, lfp );
#ifdef NEW_LOGGING
- LDAP_LOG (( "reject", LDAP_LEVEL_ERR, "write_reject: "
- "Error: ldap operation failed, data written to \"%s\"\n", rejfile ));
+ LDAP_LOG ( SLURPD, ERR, "write_reject: "
+ "Error: ldap operation failed, data written to \"%s\"\n",
+ rejfile, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: ldap operation failed, data written to \"%s\"\n",
#include "slurp.h"
#include "globals.h"
-
/*
* Just invoke the Ri's process() member function, and log the start and
* finish.
Ri *ri = (Ri *) ri_arg;
#ifdef NEW_LOGGING
- LDAP_LOG (( "replica", LDAP_LEVEL_ARGS, "replicate: "
+ LDAP_LOG ( SLURPD, ARGS, "replicate: "
"begin replication thread for %s:%d\n",
- ((Ri *)ri)->ri_hostname, ((Ri *)ri)->ri_port ));
+ ((Ri *)ri)->ri_hostname, ((Ri *)ri)->ri_port, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "begin replication thread for %s:%d\n",
((Ri *)ri)->ri_hostname, ((Ri *)ri)->ri_port, 0 );
ri->ri_process( ri );
#ifdef NEW_LOGGING
- LDAP_LOG (( "replica", LDAP_LEVEL_ARGS, "replicate: "
+ LDAP_LOG ( SLURPD, ARGS, "replicate: "
"begin replication thread for %s:%d\n",
- ri->ri_hostname, ri->ri_port ));
+ ri->ri_hostname, ri->ri_port, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "end replication thread for %s:%d\n",
ri->ri_hostname, ri->ri_port, 0 );
if ( ldap_pvt_thread_create( &(ri->ri_tid), 0, replicate,
(void *) ri ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "replica", LDAP_LEVEL_ERR, "start_replica_thread: "
+ LDAP_LOG ( SLURPD, ERR, "start_replica_thread: "
"replica %s:%d ldap_pvt_thread_create failed\n",
- ri->ri_hostname, ri->ri_port ));
+ ri->ri_hostname, ri->ri_port, 0 );
#else
Debug( LDAP_DEBUG_ANY, "replica \"%s:%d\" ldap_pvt_thread_create failed\n",
ri->ri_hostname, ri->ri_port, 0 );
char *p;
#ifdef NEW_LOGGING
- LDAP_LOG (( "replog", LDAP_LEVEL_ARGS, "copy_replog: "
- "copy replog \"%s\" to \"%s\"\n", src, dst ));
+ LDAP_LOG ( SLURPD, ARGS, "copy_replog: "
+ "copy replog \"%s\" to \"%s\"\n", src, dst, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"copy replog \"%s\" to \"%s\"\n",
}
if ( access( buf, W_OK ) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "replog", LDAP_LEVEL_ERR, "copy_replog: "
+ LDAP_LOG ( SLURPD, ERR, "copy_replog: "
"Error: (%ld): Directory %s is not writable\n",
- (long) getpid(), buf ));
+ (long) getpid(), buf, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: copy_replog (%ld): Directory %s is not writable\n",
}
if ( access( buf, W_OK ) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "replog", LDAP_LEVEL_ERR, "copy_replog: "
+ LDAP_LOG ( SLURPD, ERR, "copy_replog: "
"Error: (%ld): Directory %s is not writable\n",
- (long) getpid(), buf ));
+ (long) getpid(), buf, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: copy_replog (%ld): Directory %s is not writable\n",
rfp = lock_fopen( src, "r", &lfp );
if ( rfp == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "replog", LDAP_LEVEL_ERR, "copy_replog: "
+ LDAP_LOG ( SLURPD, ERR, "copy_replog: "
"Error: Can't lock replog \"%s\" for read: %s\n",
- src, sys_errlist[ errno ] ));
+ src, sys_errlist[ errno ], 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: copy_replog: Can't lock replog \"%s\" for read: %s\n",
dfp = lock_fopen( dst, "a", &dlfp );
if ( dfp == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "replog", LDAP_LEVEL_ERR, "copy_replog: "
+ LDAP_LOG ( SLURPD, ERR, "copy_replog: "
"Error: Can't lock replog \"%s\" for write: %s\n",
- src, sys_errlist[ errno ] ));
+ src, sys_errlist[ errno ], 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: copy_replog: Can't lock replog \"%s\" for write: %s\n",
if ( lock_fclose( dfp, dlfp ) == EOF ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "replog", LDAP_LEVEL_ERR, "copy_replog: "
- "Error: Error closing \"%s\"\n", src ));
+ LDAP_LOG ( SLURPD, ERR, "copy_replog: "
+ "Error: Error closing \"%s\"\n", src, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: copy_replog: Error closing \"%s\"\n",
}
if ( lock_fclose( rfp, lfp ) == EOF ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "replog", LDAP_LEVEL_ERR, "copy_replog: "
- "Error: Error closing \"%s\"\n", src ));
+ LDAP_LOG ( SLURPD, ERR, "copy_replog: "
+ "Error: Error closing \"%s\"\n", src, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: copy_replog: Error closing \"%s\"\n",
#endif
if ( ri == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "ri", LDAP_LEVEL_ERR, "Ri_process: "
- "Error: ri == NULL!\n" ));
+ LDAP_LOG ( SLURPD, ERR, "Ri_process: "
+ "Error: ri == NULL!\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error: Ri_process: ri == NULL!\n", 0, 0, 0 );
#endif
if ( !ismine( ri, re )) {
/* The Re doesn't list my host:port */
#ifdef NEW_LOGGING
- LDAP_LOG (( "ri", LDAP_LEVEL_DETAIL1, "Ri_process: "
+ LDAP_LOG ( SLURPD, DETAIL1, "Ri_process: "
"Replica %s:%d, skip repl record for %s (not mine)\n",
- ri->ri_hostname, ri->ri_port, re->re_dn ));
+ ri->ri_hostname, ri->ri_port, re->re_dn );
#else
Debug( LDAP_DEBUG_TRACE,
"Replica %s:%d, skip repl record for %s (not mine)\n",
} else if ( !isnew( ri, re )) {
/* This Re is older than my saved status information */
#ifdef NEW_LOGGING
- LDAP_LOG (( "ri", LDAP_LEVEL_DETAIL1, "Ri_process: "
+ LDAP_LOG ( SLURPD, DETAIL1, "Ri_process: "
"Replica %s:%d, skip repl record for %s (old)\n",
- ri->ri_hostname, ri->ri_port, re->re_dn ));
+ ri->ri_hostname, ri->ri_port, re->re_dn );
#else
Debug( LDAP_DEBUG_TRACE,
"Replica %s:%d, skip repl record for %s (old)\n",
case DO_LDAP_ERR_RETRYABLE:
ldap_pvt_thread_sleep( RETRY_SLEEP_TIME );
#ifdef NEW_LOGGING
- LDAP_LOG (( "ri", LDAP_LEVEL_DETAIL1, "Ri_process: "
+ LDAP_LOG ( SLURPD, DETAIL1, "Ri_process: "
"Retrying operation for DN %s on replica %s:%d\n",
- re->re_dn, ri->ri_hostname, ri->ri_port ));
+ re->re_dn, ri->ri_hostname, ri->ri_port );
#else
Debug( LDAP_DEBUG_ANY,
"Retrying operation for DN %s on replica %s:%d\n",
}
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "ri", LDAP_LEVEL_ERR, "Ri_process: "
- "Error: re is null in Ri_process\n" ));
+ LDAP_LOG ( SLURPD, ERR, "Ri_process: "
+ "Error: re is null in Ri_process\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error: re is null in Ri_process\n",
0, 0, 0 );
#include "slurp.h"
#include "globals.h"
-
/*
* Lock the replication queue.
*/
if ( savedhead->re_getrefcnt( savedhead ) != 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "rq", LDAP_LEVEL_WARNING, "Rq_delhead: "
- "Warning: attempt to delete when refcnt != 0\n" ));
+ LDAP_LOG ( SLURPD, WARNING, "Rq_delhead: "
+ "Warning: attempt to delete when refcnt != 0\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Warning: attempt to delete when refcnt != 0\n",
0, 0, 0 );
{
if ( rq == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "rq", LDAP_LEVEL_DETAIL1, "Rq_gc: rq is NULL!\n" ));
+ LDAP_LOG ( SLURPD, DETAIL1, "Rq_gc: rq is NULL!\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Rq_gc: rq is NULL!\n", 0, 0, 0 );
#endif
if ( rq == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "rq", LDAP_LEVEL_ARGS, "Rq_dump: rq is NULL!\n" ));
+ LDAP_LOG ( SLURPD, ARGS, "Rq_dump: rq is NULL!\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Rq_dump: rq is NULL!\n", 0, 0, 0 );
#endif
if (unlink(SLURPD_DUMPFILE) == -1 && errno != ENOENT) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "rq", LDAP_LEVEL_ERR, "Rq_dump: "
- "\"%s\" exists, cannot unlink\n", SLURPD_DUMPFILE ));
+ LDAP_LOG ( SLURPD, ERR, "Rq_dump: "
+ "\"%s\" exists, cannot unlink\n", SLURPD_DUMPFILE, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Rq_dump: \"%s\" exists, and cannot unlink\n",
SLURPD_DUMPFILE, 0, 0 );
}
if (( tmpfd = open(SLURPD_DUMPFILE, O_CREAT|O_RDWR|O_EXCL, 0600)) == -1) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "rq", LDAP_LEVEL_ERR, "Rq_dump: "
- "cannot open \"%s\" for write\n", SLURPD_DUMPFILE ));
+ LDAP_LOG ( SLURPD, ERR, "Rq_dump: "
+ "cannot open \"%s\" for write\n", SLURPD_DUMPFILE, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Rq_dump: cannot open \"%s\" for write\n",
SLURPD_DUMPFILE, 0, 0 );
}
if (( fp = fdopen( tmpfd, "w" )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "rq", LDAP_LEVEL_ERR, "Rq_dump: "
- "cannot fdopen \"%s\" for write\n", SLURPD_DUMPFILE ));
+ LDAP_LOG ( SLURPD, ERR, "Rq_dump: "
+ "cannot fdopen \"%s\" for write\n", SLURPD_DUMPFILE, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Rq_dump: cannot fdopen \"%s\" for write\n",
SLURPD_DUMPFILE, 0, 0 );
}
#ifdef NEW_LOGGING
- LDAP_LOG (( "rq", LDAP_LEVEL_ENTRY, "Rq_write: "
- "re-write on-disk replication log\n" ));
+ LDAP_LOG ( SLURPD, ENTRY, "Rq_write: "
+ "re-write on-disk replication log\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "re-write on-disk replication log\n",
0, 0, 0 );
/* and truncate to correct len */
if ( ftruncate( fileno( fp ), sglob->srpos ) < 0 ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "rq", LDAP_LEVEL_ERR, "Rq_write: "
- "Error truncating replication log: %s\n", sys_errlist[ errno ] ));
+ LDAP_LOG ( SLURPD, ERR, "Rq_write: "
+ "Error truncating replication log: %s\n", sys_errlist[ errno ], 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error truncating replication log: %s\n",
sys_errlist[ errno ], 0, 0 );
&(st->st_lfp))) < 0 ) {
if ( !st->st_err_logged ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "st", LDAP_LEVEL_ERR, "St_write: "
+ LDAP_LOG ( SLURPD, ERR, "St_write: "
"Error: cannot open status file \"%s\":%s\n",
- sglob->slurpd_status_file, sys_errlist[ errno ] ));
+ sglob->slurpd_status_file, sys_errlist[ errno ], 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Error: cannot open status file \"%s\": %s\n",
*/
if (( fp = fopen( sglob->slurpd_status_file, "w" )) == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG (( "st", LDAP_LEVEL_ERR, "St_write: "
+ LDAP_LOG ( SLURPD, ERR, "St_write: "
"Error: cannot create status file \"%s\"\n",
- sglob->slurpd_status_file ));
+ sglob->slurpd_status_file, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Error: cannot create status file \"%s\"\n",
sglob->slurpd_status_file, 0, 0 );
(void) fclose( fp );
ldap_pvt_thread_mutex_unlock( &(st->st_mutex ));
#ifdef NEW_LOGGING
- LDAP_LOG (( "st", LDAP_LEVEL_DETAIL1, "St_write: "
- "No status file found, defaulting values\n" ));
+ LDAP_LOG ( SLURPD, DETAIL1, "St_write: "
+ "No status file found, defaulting values\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, "No status file found, defaulting values\n",
0, 0, 0 );
sprintf( tbuf, "%s:%s (timestamp %s.%s)", hostname, port,
timestamp, seq );
#ifdef NEW_LOGGING
- LDAP_LOG (( "st", LDAP_LEVEL_DETAIL1, "St_write: "
- "Retrieved state information for %s\n", tbuf ));
+ LDAP_LOG ( SLURPD, DETAIL1, "St_write: "
+ "Retrieved state information for %s\n", tbuf, 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS,
"Retrieved state information for %s\n", tbuf, 0, 0 );
#endif
} else {
#ifdef NEW_LOGGING
- LDAP_LOG (( "st", LDAP_LEVEL_WARNING, "St_write: "
+ LDAP_LOG ( SLURPD, WARNING, "St_write: "
"Warning: saved state for %s:%s, not a known replica\n",
- hostname, port ));
+ hostname, port, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"Warning: saved state for %s:%s, not a known replica\n",