[問題] 推薦的Logging library for C++
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
VC++ on Visual Studio 2013
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
想請教板上的各位先進,
最近小弟在嘗試寫自己的Logging class和survey既有logging library for C++間擺盪
寫logging function似乎還要兼顧到thread safe和performance的問題,
所以不太確定是否其實去使用其他人已經分享的log lib. 就好@@"
因此想請教板上的各位朋友,
有沒有推薦的logging library for C++供小弟參考?
Google了一陣,其實有點眼花撩亂,因此想聽聽板上朋友們的建議:)
非常感謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.160.154.39
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1442286388.A.B29.html
推
09/15 13:32, , 1F
09/15 13:32, 1F
推
09/15 13:44, , 2F
09/15 13:44, 2F
我下午在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
→
09/15 17:46, , 3F
09/15 17:46, 3F
→
09/15 17:46, , 4F
09/15 17:46, 4F
→
09/15 17:47, , 5F
09/15 17:47, 5F
推
09/16 16:45, , 6F
09/16 16:45, 6F
→
10/15 08:41, , 7F
10/15 08:41, 7F