Problem using pantheios file stock back end

倖福魔咒の 提交于 2019-12-12 23:30:06

问题


I am trying to use pantheios file stock back end to log from my dll in c++. The file gets created but nothing gets written to the file.
Here is a snippet of my code

if (pantheios::pantheios_init() < 0)
{    
   MessageBox(NULL, "Init Failed", "fvm", MB_OK);
}else {
   MessageBox(NULL, "Init Passed", "fvm", MB_OK);
   pantheios::log_INFORMATIONAL("Logger enabled!");
}

DWORD pid = GetCurrentProcessId();
sprintf_s(moduleName, sizeof(moduleName), "C:\\%d.log", pid);
pantheios_be_file_setFilePath(moduleName, PANTHEIOS_BE_FILE_F_TRUNCATE,PANTHEIOS_BE_FILE_F_TRUNCATE, PANTHEIOS_BEID_LOCAL);
pantheios::log(pantheios::debug, "Entering main");

I get the Init Passed message box but no log statements are dumped in the file.

来源:https://stackoverflow.com/questions/2474274/problem-using-pantheios-file-stock-back-end

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!