mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 10:39:34 -05:00
example client using new logging
This commit is contained in:
parent
b9837286db
commit
fd4b8ba0cd
1 changed files with 7 additions and 0 deletions
|
|
@ -165,6 +165,7 @@ main( int argc, char **argv )
|
|||
{
|
||||
char *infile, *filtpattern, **attrs = NULL, line[BUFSIZ];
|
||||
FILE *fp = NULL;
|
||||
FILE *log = NULL;
|
||||
int rc, i, first, scope, deref, attrsonly, manageDSAit;
|
||||
int referrals, timelimit, sizelimit, debug;
|
||||
int authmethod, version, want_bindpw;
|
||||
|
|
@ -174,6 +175,11 @@ main( int argc, char **argv )
|
|||
debug = verbose = not = vals2tmp = referrals =
|
||||
attrsonly = manageDSAit = ldif = want_bindpw = 0;
|
||||
|
||||
lutil_log_initialize(argc, argv);
|
||||
lutil_set_debug_level( "LIBLBER", 8 );
|
||||
/* log = fopen( "ldapsearch.log", "w" ); */
|
||||
/* ber_set_option( NULL, LBER_OPT_LOG_PRINT_FILE, log ); */
|
||||
|
||||
deref = sizelimit = timelimit = version = -1;
|
||||
|
||||
scope = LDAP_SCOPE_SUBTREE;
|
||||
|
|
@ -728,6 +734,7 @@ main( int argc, char **argv )
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {
|
||||
if ( use_tls > 1 ) {
|
||||
ldap_perror( ld, "ldap_start_tls" );
|
||||
|
|
|
|||
Loading…
Reference in a new issue