如何輸出xapian debug的log

2021-08-20 16:20:49 字數 1880 閱讀 2835

xapian內部關係呼叫比較複雜, 想要了解內部的函式呼叫關係比較有難度, 好在內部使用logcall_ctor等輸出了很多log, 如何列印這些log呢? 命令如下

cd xapian-core-1.4.5

# xapin-source downloaded

# install

mkdir build

cd build

../configure --enable-log=yes --enable-assertions=yes

# execute on a demo

export xapian_debug_log=- # - means output log to stderr, also you can set a file path.

export xapian_debug_flags=- # - means output all category logs.

./search_demo_exe

log examples

logging)

d 1109 [0x7fb14b001ab8]

void

glasstable

::open(-1, glass

::rootinfo, 12) returned

d 1109 [0x7fb14b0018e0]

void

glasstable

::open(-1, glass

::rootinfo, 12)

d 1109 [0x7fb14b0018e0]

void

glasstable

::close(false)

d 1109 [0x7fb14b0018e0]

void

glasstable

::close(false)

returned

d 1109 [0x7fb14b0018e0]

bool

glasstable

::do_open_to_read(&glass

::rootinfo, 12)

d 1109 [0x7fb14b0018e0]

bool

glasstable

::do_open_to_read(&glass

::rootinfo, 12) returned (not

marked

upfor

return

logging)

d 1109 [0x7fb14b0018e0]

void

glasstable

::open(-1, glass

::rootinfo, 12) returned

d 1109 [0x7fb14b0016b0]

void

glasstable

::open(-1, glass

::rootinfo, 12)

d 1109 [0x7fb14b0016b0]

void

glasstable

::close(false)

d 1109 [0x7fb14b0016b0]

void

glasstable

::close(false)

returned

參考:

xapian-core-1.4.5/install

xapian-core-1.4.5/hacking

mac 安裝xapian

[xapian-discuss] how to debug xapian?

ticket #156: hacking

如何輸出吃掉空格

為賦值禁止字元 使用getchar 或 t tab三個空格 includeint main 輸出結果 摁回車鍵 yesint n scanf d c n 在c語言中,scanf d c n 中 d表示讀整數,c表示忽略掉乙個字元型的輸入項,n表示物件n在記憶體中的位址。scanf d c n 整體表...

Python如何輸出整數

python輸出整數的方法 先使用str 函式將數字轉換成字串賦值給變數程式設計客棧i,再用 if i.cwww.cppcns.comount 0 語句判斷字串中是否沒有小數點,如果是則輸出這個字串,這樣輸出的數字就都是整數了 示例 如下 x 23.5,45.6,987,698,123,654 fo...

如何逆序輸出單鏈表?

怎樣才能逆序輸出單鏈表呢?剛剛有人考了我一道題,逆序輸出單鏈表 我是這樣答的 下面的 為偽 不能通過編譯 void printslist slist plist printf s str.c str 後來他讓我想一想還有沒有更為簡單的方法了,當時允許我上網,我用了幾分鐘到網上找了一下,沒有找到更好的...