Re: Debug logs
Bhawna <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.directory |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <0e826c9a-de8d-48aa-a229-ebe8a608547d@b40g2000prf.googlegroups.com> |
On Dec 4, 5:35 pm, Anton Bobrov <[email protected]> wrote: > you can use it for your own stuff if you want but to get debug > log data out of LDAP/LBER you dont need to use/call any API/ > macro just set appropriate debug loggin options thats all. > > Bhawna wrote: > > On Dec 4, 5:00 pm, Anton Bobrov <[email protected]> wrote: > >> Bhawna wrote: > >>> /* Unconditional log entry */ > >>> LDAPDebug( LDAP_DEBUG_TRACE, "ldap_perror\n", 0, 0, 0 ); > >> i'm not sure what this line is for in your case. all you have to > >> do is set relevant LDAP/LBER options as in example provided. > > >>> Please let me know is it all that is needed. If yes, where will this > >>> log file be created. > >> flushed to where your stderr directed, redirect your stderr to > >> a regular file if you want it in a file. > > >>> Can you please suggest some link for Mozilla, where all about logging > >>> is documented. > >> i dont recall it actually being described in the docs or wiki, > >> plz feel free to correct me or contribute to wiki otherwise. > > > I am using LDAPDebug macro defined in ldaplog.h (which is in include > > directory of the source code from mozilla), after including ldaplog.h > > in my program. Please see below the definition for this macro in > > ldaplog.h > > > #ifdef LDAP_DEBUG > > # undef LDAPDebug > > > /* SLAPD_LOGGING should not be on for WINSOCK (16-bit Windows) */ > > # if defined(SLAPD_LOGGING) > > # ifdef _WIN32 > > extern int *module_ldap_debug; > > # define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \ > > { \ > > if ( *module_ldap_debug & level ) { \ > > slapd_log_error_proc( NULL, fmt, arg1, arg2, arg3 ); \ > > } \ > > } > > # else /* _WIN32 */ > > extern int ldap_debug; > > # define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \ > > { \ > > if ( ldap_debug & level ) { \ > > slapd_log_error_proc( NULL, fmt, arg1, arg2, arg3 ); \ > > } \ > > } > > # endif /* Win32 */ > > # else /* no SLAPD_LOGGING */ > > extern void ber_err_print( char * ); > > extern int ldap_debug; > > # define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \ > > if ( ldap_debug & level ) { \ > > char msg[256]; \ > > sprintf( msg, fmt, arg1, arg2, arg3 ); \ > > ber_err_print( msg ); \ > > } > > # endif /* SLAPD_LOGGING */ > > #endif /* LDAP_DEBUG */ > > > Thanks and Regards > > Bhawna > > _______________________________________________ > > dev-tech-ldap mailing list > > [email protected] > >https://lists.mozilla.org/listinfo/dev-tech-ldap Alright. Thanks a lot.