推 Killercat: 不就log4cxx.... 09/15 13:32
推 BlazarArc: 我用過boost log沒跟其他log lib比較過,你可以試試看 09/15 13:44
我下午在survey boost log的東西
發現它可以(或需要?)設定的東西好像很多
如果自己實作的話想到要實作的功能大概是
1) 不同component寫message到不同的file (Severity感覺用switch case就可分類?)
2) File rotation
3) 寫message時前後用mutex夾住 (in case component變成multi-thread)
這些功能看似直覺,看boost log的話,感覺會拉進去很多boost的code進去?
但自己寫的話,其實有點沒把握可以寫得堪用
(performance, thread-safe等,雖然整包code 感覺會小點)
但使用boost log有點怕設定上漏掉什麼,不知道這樣是不是好的做法 XD
好吧,小弟真的很菜有些無聊的想東想西疑慮 XD
其實還蠻好奇板上的大大們針對logging的function,
大部分是自己寫還是call 3rd party library居多?
※ 編輯: ptthidebear (1.160.154.39), 09/15/2015 17:11:23
→ Killercat: boost問題就是比較胖一點,所以我還是推log4cxx 09/15 17:46
→ Killercat: 不過單講效能,其實除了boost的語法有點討厭以外 09/15 17:46
→ Killercat: 其實效能來講每家都差不多的... 09/15 17:47
推 clementchen: g2log or g3log ? 09/16 16:45
→ ptthidebear: 謝謝各位! 小弟目前先試試看Boost Log :) 10/15 08:41