Re: output debug information of LOGCALL_CTOR/LOGCALL_VOID/...
Olly Betts <[email protected]>
| Newsgroups | gmane.comp.search.xapian.general |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Jun 09, 2018 at 10:54:59AM +0100, James Aylett wrote: > On 9 Jun 2018, at 07:37, 张少华 <[email protected]> wrote: > > > Also, I notice -DXAPIAN_REALLY_NO_DEBUG_LOG is added in > > xapian-core-1.4.5/Makefile, so I deleted this options, but I can not > > compile successfully then. > > That symbol is to stop debug calls being available when compiling > things that use Xapian. It's used in common/debuglog.h, which says: > > // In places where we include library code in non-library contexts, we can't > // have debug logging enabled, as the support functions aren't visible > > which sounds like exactly what you've encountered. That's a somewhat nasty mechanism currently needed for building xapian-inspect, a low-level database table inspection tool aimed at people doing development work on Xapian. This tool has to include various library-internal bits of the backend code, but debug logging is not useful when running xapian-inspect and so we disable debug logging when building code for xapian-inspect to avoid dragging in yet more library internal code just to support unwanted debug logging there. We used to just expose all the internals xapian-inspect needed as undocumented symbols exported from libxapian, but that was really even more nasty as we were then limited as to what changes we could make to those internals during a stable release series. As a library user it's definitely not something that you should need to be fiddling with. Cheers, Olly