我正在使用pantheios庫進行日誌記錄。我有:Pantheios在C++中設置顯示級別
pantheios::log(pantheios::debug, "I'm debug");
pantheios::log(pantheios::informational, "Some info");
,其輸出:
[MyApplication的6月14 15:45:26.549;調試]:我調試
[MyApplication.1,Jun 14 15:45:26.549;信息]:一些信息
但我想顯示的信息和調試之間進行選擇:
set_level(pantheios::informational) //what should this be ?
pantheios::log(pantheios::debug, "I'm debug");
pantheios::log(pantheios::informational, "Some info");
,輸出:
[MyApplication.1,15年6月14日:45:26.549;信息]:一些信息
http://dinhngocson.blogspot.com/2010/11/pantheios-logging-library-basic.html – 2012-06-14 13:35:23