output debug information of LOGCALL_CTOR/LOGCALL_VOID/...
James Aylett
james at tartarus.org
Sat Jun 9 10:54:59 BST 2018
On 9 Jun 2018, at 07:37, 张少华 <xiangqianzsh at 163.com> wrote:
> Many functions in xapian can be traced when they are called using LOGCALL_CTOR/LOGCALL_VOID/... and I want to output the debug information.
In xapian-core/HACKING in the source code there's a section on this. As well as pass --enable-log to configure, you also need to:
* set XAPIAN_DEBUG_LOG to be the path to a file that you would like debugging
output to be appended to, or to the special value ``-`` to indicate that you
would like debugging output to be sent to stderr. Unless XAPIAN_DEBUG_LOG
is set, no debug logging will be performed. Occurrences of %p in
XAPIAN_DEBUG_LOG will be replaced with the current process-id.
> 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.
J
--
James Aylett
devfort.com — spacelog.org — tartarus.org/james/
More information about the Xapian-discuss
mailing list