修复不保存日志文件的bug

This commit is contained in:
xia-chu 2023-04-23 14:30:41 +08:00
parent 81d0ba97a1
commit 41451f6a93

View File

@ -212,7 +212,7 @@ int start_main(int argc,char *argv[]) {
//设置日志 //设置日志
Logger::Instance().add(std::make_shared<ConsoleChannel>("ConsoleChannel", logLevel)); Logger::Instance().add(std::make_shared<ConsoleChannel>("ConsoleChannel", logLevel));
#if defined(ANDROID) #if !defined(ANDROID)
auto fileChannel = std::make_shared<FileChannel>("FileChannel", exeDir() + "log/", logLevel); auto fileChannel = std::make_shared<FileChannel>("FileChannel", exeDir() + "log/", logLevel);
// 日志最多保存天数 // 日志最多保存天数
fileChannel->setMaxDay(cmd_main["max_day"]); fileChannel->setMaxDay(cmd_main["max_day"]);