Commit 1814d9b6 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

mostly new logging

parent e02ab3a0
......@@ -58,7 +58,7 @@ ldap_abandon_ext(
{
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
......@@ -86,7 +86,7 @@ int
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
......@@ -110,8 +110,7 @@ do_abandon(
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 );
......
......@@ -100,7 +100,7 @@ ldap_add_ext(
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
......
......@@ -42,7 +42,7 @@
#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
......@@ -61,7 +61,7 @@ int
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
......@@ -110,7 +110,7 @@ ldap_bind_s(
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
......
......@@ -118,7 +118,7 @@ ldap_flush_cache( LDAP *ld )
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
......@@ -154,9 +154,9 @@ ldap_uncache_request( LDAP *ld, int msgid )
#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 );
......@@ -176,9 +176,9 @@ ldap_uncache_entry( LDAP *ld, LDAP_CONST char *dn )
#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 );
......@@ -200,9 +200,10 @@ uncache_entry_or_req( LDAP *ld,
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",
......@@ -266,7 +267,7 @@ ldap_add_request_to_cache( LDAP *ld, ber_tag_t msgtype, BerElement *request )
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
......@@ -318,9 +319,10 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result )
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 );
......@@ -329,8 +331,8 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result )
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
......@@ -345,9 +347,9 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result )
* 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 );
......@@ -376,9 +378,9 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result )
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",
......@@ -418,9 +420,9 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result )
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",
......@@ -436,9 +438,9 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result )
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",
......@@ -448,9 +450,8 @@ ldap_add_result_to_cache( LDAP *ld, LDAPMessage *result )
}
} 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 );
......@@ -481,7 +482,7 @@ ldap_check_cache( LDAP *ld, ber_tag_t msgtype, BerElement *request )
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
......@@ -503,9 +504,9 @@ ldap_check_cache( LDAP *ld, ber_tag_t msgtype, BerElement *request )
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 );
......@@ -519,9 +520,8 @@ ldap_check_cache( LDAP *ld, ber_tag_t msgtype, BerElement *request )
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 );
......@@ -562,9 +562,8 @@ ldap_check_cache( LDAP *ld, ber_tag_t msgtype, BerElement *request )
}
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 );
......@@ -572,8 +571,8 @@ ldap_check_cache( LDAP *ld, ber_tag_t msgtype, BerElement *request )
}
#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
......@@ -603,9 +602,8 @@ cache_hash( BerElement *ber )
}
#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 );
......@@ -760,9 +758,9 @@ check_cache_memused( LDAPCache *lc )
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 );
......@@ -789,9 +787,8 @@ check_cache_memused( LDAPCache *lc )
}
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",
......@@ -807,9 +804,9 @@ check_cache_memused( LDAPCache *lc )
}
#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 );
......
......@@ -29,6 +29,7 @@
#include <ac/time.h>
#include "ldap-int.h"
#include "ldap_log.h"
/*
* ldap_compare_ext - perform an ldap extended compare operation. The dn
......@@ -55,7 +56,7 @@ ldap_compare_ext(
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
......
......@@ -361,7 +361,7 @@ Sockbuf_IO ldap_pvt_sockbuf_io_sasl = {
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 );
......@@ -457,8 +457,8 @@ ldap_int_sasl_open(
}
#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 );
......@@ -479,8 +479,8 @@ ldap_int_sasl_open(
(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 );
......@@ -525,8 +525,8 @@ ldap_int_sasl_bind(
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 );
......@@ -637,9 +637,9 @@ ldap_int_sasl_bind(
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",
......@@ -655,9 +655,9 @@ ldap_int_sasl_bind(
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",
......@@ -678,8 +678,8 @@ ldap_int_sasl_bind(
&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 );
......
......@@ -49,7 +49,7 @@ ldap_delete_ext(
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
......@@ -139,7 +139,7 @@ ldap_delete( LDAP *ld, LDAP_CONST char *dn )
*/
#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
......
......@@ -12,12 +12,12 @@
*/
#include "portable.h"
#include <stdio.h>
#include <ac/stdlib.h>
#include <ac/string.h>
#include <ac/unistd.h>
#include <stdio.h>
#include <ldap.h>
#include "ldap-int.h"
......
......@@ -30,13 +30,13 @@ static struct ldaperror ldap_builtin_errlist[] = {
{LDAP_COMPARE_FALSE, "Compare False" },
{LDAP_COMPARE_TRUE, "Compare True" },
{LDAP_STRONG_AUTH_NOT_SUPPORTED, "Authentication method not supported" },
{LDAP_STRONG_AUTH_REQUIRED, "Strong authentication required" },
{LDAP_STRONG_AUTH_REQUIRED, "Strong(er) authentication required" },
{LDAP_PARTIAL_RESULTS, "Partial results and referral received" },
{LDAP_REFERRAL, "Referral"},
{LDAP_ADMINLIMIT_EXCEEDED, "Administrative limit exceeded"},
{LDAP_UNAVAILABLE_CRITICAL_EXTENSION,
"Criticial extension is unavailable"},
"Critical extension is unavailable"},
{LDAP_CONFIDENTIALITY_REQUIRED, "Confidentiality required"},
{LDAP_SASL_BIND_IN_PROGRESS, "SASL bind in progress"},
......@@ -56,21 +56,21 @@ static struct ldaperror ldap_builtin_errlist[] = {
{LDAP_INAPPROPRIATE_AUTH, "Inappropriate authentication" },
{LDAP_INVALID_CREDENTIALS, "Invalid credentials" },
{LDAP_INSUFFICIENT_ACCESS, "Insufficient access" },
{LDAP_BUSY, "DSA is busy" },
{LDAP_UNAVAILABLE, "DSA is unavailable" },
{LDAP_UNWILLING_TO_PERFORM, "DSA is unwilling to perform" },
{LDAP_BUSY, "Server is busy" },
{LDAP_UNAVAILABLE, "Server is unavailable" },
{LDAP_UNWILLING_TO_PERFORM, "Server is unwilling to perform" },
{LDAP_LOOP_DETECT, "Loop detected" },
{LDAP_NAMING_VIOLATION, "Naming violation" },
{LDAP_OBJECT_CLASS_VIOLATION, "Object class violation" },
{LDAP_NOT_ALLOWED_ON_NONLEAF, "Operation not allowed on nonleaf" },
{LDAP_NOT_ALLOWED_ON_NONLEAF, "Operation not allowed on non-leaf" },
{LDAP_NOT_ALLOWED_ON_RDN, "Operation not allowed on RDN" },
{LDAP_ALREADY_EXISTS, "Already exists" },
{LDAP_NO_OBJECT_CLASS_MODS, "Cannot modify object class" },
{LDAP_RESULTS_TOO_LARGE, "Results too large" },
{LDAP_AFFECTS_MULTIPLE_DSAS, "Operation affects multiple DSAs" },
{LDAP_OTHER, "Unknown error" },
{LDAP_OTHER, "Internal (implementation specific) error" },
/* API ResultCodes */
{LDAP_SERVER_DOWN, "Can't contact LDAP server" },
......@@ -147,7 +147,7 @@ ldap_err2string( int err )
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
......@@ -163,7 +163,7 @@ ldap_perror( LDAP *ld, LDAP_CONST char *str )
{
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
......@@ -243,7 +243,7 @@ ldap_parse_result(
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
......
......@@ -30,6 +30,7 @@
#include <ac/time.h>
#include "ldap-int.h"
#include "ldap_log.h"
int
ldap_extended_operation(
......@@ -44,7 +45,7 @@ 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
......@@ -117,7 +118,7 @@ ldap_extended_operation_s(
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
......@@ -173,7 +174,7 @@ ldap_parse_extended_result (
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
......@@ -300,8 +301,7 @@ ldap_parse_extended_partial (
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
......
......@@ -357,8 +357,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
*/
#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
......@@ -380,8 +379,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
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 );
......@@ -399,8 +397,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
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 );
......@@ -418,8 +415,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
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 );
......@@ -437,8 +433,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
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 );
......@@ -488,8 +483,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
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 );
......@@ -508,8 +502,7 @@ ldap_pvt_put_filter( BerElement *ber, const char *str_in )
default: /* assume it's a simple type=value filter */
#ifdef NEW_LOGGING
LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
"ldap_pvt_put_filter: default\n" ));